From 91bbeb9ad5c0845a0778823bd462fe88238a2255 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sun, 19 Aug 2018 18:21:45 +0900
Subject: [PATCH 01/33] =?UTF-8?q?NetCommonsTreeBehavior=E5=AF=BE=E5=BF=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Model/MenuFramesPage.php | 10 +++++++---
Model/MenuFramesRoom.php | 3 ++-
View/Helper/MenuFormHelper.php | 3 ++-
View/Helper/MenuHelper.php | 3 ++-
4 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/Model/MenuFramesPage.php b/Model/MenuFramesPage.php
index 2611a53..f3f79f7 100644
--- a/Model/MenuFramesPage.php
+++ b/Model/MenuFramesPage.php
@@ -92,8 +92,11 @@ public function getMenuData($options = array()) {
$this->Page->alias . '.room_id',
$this->Page->alias . '.root_id',
$this->Page->alias . '.parent_id',
- $this->Page->alias . '.lft',
- $this->Page->alias . '.rght',
+ //$this->Page->alias . '.lft',
+ //$this->Page->alias . '.rght',
+ $this->Page->alias . '.weight',
+ $this->Page->alias . '.sort_key',
+ $this->Page->alias . '.child_count',
$this->Page->alias . '.permalink',
$this->PagesLanguage->alias . '.page_id',
$this->PagesLanguage->alias . '.name',
@@ -155,7 +158,8 @@ public function getMenuData($options = array()) {
),
),
'order' => array(
- $this->Page->alias . '.lft' => 'asc',
+ //$this->Page->alias . '.lft' => 'asc',
+ $this->Page->alias . '.sort_key' => 'asc',
)
), $options, ['conditions' => $pageLangConditions]);
diff --git a/Model/MenuFramesRoom.php b/Model/MenuFramesRoom.php
index b3ed3ef..780e798 100644
--- a/Model/MenuFramesRoom.php
+++ b/Model/MenuFramesRoom.php
@@ -186,7 +186,8 @@ private function __getDefaultQueryOptions() {
),
),
'order' => array(
- $this->Room->alias . '.lft' => 'asc',
+ //$this->Room->alias . '.lft' => 'asc',
+ $this->Room->alias . '.sort_key' => 'asc',
)
);
}
diff --git a/View/Helper/MenuFormHelper.php b/View/Helper/MenuFormHelper.php
index 2dac540..98e2bab 100644
--- a/View/Helper/MenuFormHelper.php
+++ b/View/Helper/MenuFormHelper.php
@@ -144,7 +144,8 @@ public function checkboxMenuFramesPage($roomId, $room, $pageId, $menu, $rootRoom
'prefixInput' => $prefixInput,
'pageId' => $pageId,
'nest' => $nest,
- 'displayWhenClicking' => $menu['Page']['lft'] + 1 !== (int)$menu['Page']['rght'],
+ //'displayWhenClicking' => $menu['Page']['lft'] + 1 !== (int)$menu['Page']['rght'],
+ 'displayWhenClicking' => !(bool)$menu['Page']['child_count'],
'domChildPageIds' => $domChildPageIds,
'roomDisabled' => $roomDisabled,
'pageNameCss' => $this->_getPageNameCss($room, $pageId),
diff --git a/View/Helper/MenuHelper.php b/View/Helper/MenuHelper.php
index b6de0d6..d19fb4e 100644
--- a/View/Helper/MenuHelper.php
+++ b/View/Helper/MenuHelper.php
@@ -82,7 +82,8 @@ public function renderParent($displayType = null) {
$html = '';
$parentPageIds = Hash::extract($this->_View->viewVars, 'parentPages.{n}.Page.id');
$childPages = $this->_View->viewVars['pages'][1]['ChildPage'];
- $childPages = Hash::sort($childPages, '{n}.lft', 'asc');
+ //$childPages = Hash::sort($childPages, '{n}.lft', 'asc');
+ $childPages = Hash::sort($childPages, '{n}.sort_key', 'asc');
$parentPageIds = array_merge(array(Hash::get($childPages, '0.id')), $parentPageIds);
$parentPageIds = array_unique($parentPageIds);
From 86c8f98d97a522b1e7e3ebdb0d5424cee3801a9d Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Mon, 3 Sep 2018 22:15:36 +0900
Subject: [PATCH 02/33] =?UTF-8?q?phpunit=E3=82=A8=E3=83=A9=E3=83=BC?=
=?UTF-8?q?=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Test/Fixture/Page4menuFixture.php | 81 ++++++++++++++++++++++++++-----
1 file changed, 69 insertions(+), 12 deletions(-)
diff --git a/Test/Fixture/Page4menuFixture.php b/Test/Fixture/Page4menuFixture.php
index feb7a88..2d00403 100644
--- a/Test/Fixture/Page4menuFixture.php
+++ b/Test/Fixture/Page4menuFixture.php
@@ -40,63 +40,120 @@ class Page4menuFixture extends PageFixture {
public $records = array(
//パブリックスペースのページ(使われることはない)
array(
- 'id' => '1', 'room_id' => '2', 'root_id' => null, 'parent_id' => null, 'lft' => '1', 'rght' => '16',
+ 'id' => '1', 'room_id' => '2', 'root_id' => null,
+ 'parent_id' => null,
+ //'lft' => '1', 'rght' => '16',
+ 'weight' => '1',
+ 'sort_key' => '~00000001',
+ 'child_count' => '7',
'permalink' => '', 'slug' => null,
),
//パブリックスペースのホーム
array(
- 'id' => '4', 'room_id' => '2', 'root_id' => '1', 'parent_id' => '1', 'lft' => '2', 'rght' => '5',
+ 'id' => '4', 'room_id' => '2', 'root_id' => '1',
+ 'parent_id' => '1',
+ //'lft' => '2', 'rght' => '5',
+ 'weight' => '1',
+ 'sort_key' => '~00000001-00000001',
+ 'child_count' => '0',
'permalink' => 'home', 'slug' => 'home',
),
////ホーム/test4
//array(
- // 'id' => '7', 'room_id' => '2', 'root_id' => '1', 'parent_id' => '4', 'lft' => '3', 'rght' => '4',
+ // 'id' => '7', 'room_id' => '2', 'root_id' => '1',
+ // 'parent_id' => '4',
+ // 'lft' => '3', 'rght' => '4',
// 'permalink' => 'test4', 'slug' => 'test4',
//),
//パブリックスペースのtest5
array(
- 'id' => '8', 'room_id' => '2', 'root_id' => '1', 'parent_id' => '1', 'lft' => '6', 'rght' => '7',
+ 'id' => '8', 'room_id' => '2', 'root_id' => '1',
+ 'parent_id' => '1',
+ //'lft' => '6', 'rght' => '7',
+ 'weight' => '2',
+ 'sort_key' => '~00000001-00000002',
+ 'child_count' => '0',
'permalink' => 'test5', 'slug' => 'test5',
),
//page.permalink=page_1
array(
- 'id' => '9', 'room_id' => '2', 'root_id' => '1', 'parent_id' => '1', 'lft' => '8', 'rght' => '13',
+ 'id' => '9', 'room_id' => '2', 'root_id' => '1',
+ 'parent_id' => '1',
+ //'lft' => '8', 'rght' => '13',
+ 'weight' => '3',
+ 'sort_key' => '~00000001-00000003',
+ 'child_count' => '2',
'permalink' => 'page_1', 'slug' => 'page_1',
),
//page.permalink=page_1/page_3
array(
- 'id' => '11', 'room_id' => '2', 'root_id' => '1', 'parent_id' => '9', 'lft' => '9', 'rght' => '12',
+ 'id' => '11', 'room_id' => '2', 'root_id' => '1',
+ 'parent_id' => '9',
+ //'lft' => '9', 'rght' => '12',
+ 'weight' => '1',
+ 'sort_key' => '~00000001-00000003-00000001',
+ 'child_count' => '1',
'permalink' => 'page_3', 'slug' => 'page_3',
),
//page.permalink=page_1/page_3/page_6
array(
- 'id' => '12', 'room_id' => '2', 'root_id' => '1', 'parent_id' => '11', 'lft' => '10', 'rght' => '11',
+ 'id' => '12', 'room_id' => '2', 'root_id' => '1',
+ 'parent_id' => '11',
+ //'lft' => '10', 'rght' => '11',
+ 'weight' => '1',
+ 'sort_key' => '~00000001-00000003-00000001-00000001',
+ 'child_count' => '0',
'permalink' => 'page_6', 'slug' => 'page_6',
),
//page.permalink=page_2
array(
- 'id' => '10', 'room_id' => '2', 'root_id' => '1', 'parent_id' => '1', 'lft' => '14', 'rght' => '15',
+ 'id' => '10', 'room_id' => '2', 'root_id' => '1',
+ 'parent_id' => '1',
+ //'lft' => '14', 'rght' => '15',
+ 'weight' => '4',
+ 'sort_key' => '~00000001-00000004',
+ 'child_count' => '0',
'permalink' => 'page_2', 'slug' => 'page_2',
),
//プライベートスペースのページ(使われることはない)
array(
- 'id' => '2', 'room_id' => '3', 'root_id' => null, 'parent_id' => null, 'lft' => '17', 'rght' => '18',
+ 'id' => '2', 'room_id' => '3', 'root_id' => null,
+ 'parent_id' => null,
+ //'lft' => '17', 'rght' => '18',
+ 'weight' => '2',
+ 'sort_key' => '~00000002',
+ 'child_count' => '0',
'permalink' => '', 'slug' => null,
),
//グループスペースのページ(使われることはない)
array(
- 'id' => '3', 'room_id' => '4', 'root_id' => null, 'parent_id' => null, 'lft' => '19', 'rght' => '24',
+ 'id' => '3', 'room_id' => '4', 'root_id' => null,
+ 'parent_id' => null,
+ //'lft' => '19', 'rght' => '24',
+ 'weight' => '2',
+ 'sort_key' => '~00000003',
+ 'child_count' => '2',
'permalink' => '', 'slug' => null,
),
//別ルーム(room_id=4)
array(
- 'id' => '5', 'room_id' => '5', 'root_id' => '3', 'parent_id' => '3', 'lft' => '20', 'rght' => '21',
+ 'id' => '5', 'room_id' => '5', 'root_id' => '3',
+ 'parent_id' => '3',
+ //'lft' => '20', 'rght' => '21',
+ 'weight' => '1',
+ 'sort_key' => '~00000003-00000001',
+ 'child_count' => '0',
'permalink' => 'test2', 'slug' => 'test2',
),
//別ルーム(room_id=5、ブロックなし)
array(
- 'id' => '6', 'room_id' => '6', 'root_id' => '3', 'parent_id' => '3', 'lft' => '22', 'rght' => '23',
+ 'id' => '6', 'room_id' => '6', 'root_id' => '3',
+ 'parent_id' => '3',
+ //'lft' => '22', 'rght' => '23',
+ 'weight' => '2',
+ 'sort_key' => '~00000003-00000002',
+ 'child_count' => '0',
'permalink' => 'test3', 'slug' => 'test3',
),
);
From e64a39f9feb89f68af1af57438278ae5d75911af Mon Sep 17 00:00:00 2001
From: A11creATor-
Date: Fri, 12 Oct 2018 11:31:02 +0000
Subject: [PATCH 03/33] =?UTF-8?q?refs=20#1353=20#1354=20=E8=A8=AD=E5=AE=9A?=
=?UTF-8?q?=E7=94=BB=E9=9D=A2=E3=81=A7=E3=82=AF=E3=83=AA=E3=83=83=E3=82=AF?=
=?UTF-8?q?=E6=99=82=E3=81=AE=E8=A1=A8=E7=A4=BA=E3=83=9C=E3=82=BF=E3=83=B3?=
=?UTF-8?q?=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E9=A0=85=E7=9B=AE?=
=?UTF-8?q?=E3=81=8C=E9=96=93=E9=81=95=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B?=
=?UTF-8?q?=E3=80=81=E3=83=97=E3=83=AB=E3=83=80=E3=82=A6=E3=83=B3=E3=83=A1?=
=?UTF-8?q?=E3=83=8B=E3=83=A5=E3=83=BC=E3=82=92=E9=96=8B=E3=81=8F=E3=81=A8?=
=?UTF-8?q?=E3=81=8D=E3=83=9A=E3=83=BC=E3=82=B8=E5=85=88=E9=A0=AD=E3=81=B8?=
=?UTF-8?q?=E7=A7=BB=E5=8B=95=E3=81=99=E3=82=8B=E3=81=93=E3=81=A8=E3=81=AB?=
=?UTF-8?q?=E5=AF=BE=E5=BF=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
View/Elements/Menus/header/list_start.ctp | 4 ++--
View/Helper/MenuFormHelper.php | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/View/Elements/Menus/header/list_start.ctp b/View/Elements/Menus/header/list_start.ctp
index 8b799de..d60b46b 100644
--- a/View/Elements/Menus/header/list_start.ctp
+++ b/View/Elements/Menus/header/list_start.ctp
@@ -14,13 +14,13 @@ if ($nest === 0) {
$linkClick = 'linkClick(\'' . $this->Menu->getLinkDomId('header', $pageId) . '\')';
if ($isActive || $isRootActive) {
if ($hasChild) {
- $listTagStart = '';
+ $listTagStart = '';
} else {
$listTagStart = '';
}
} else {
if ($hasChild) {
- $listTagStart = '';
+ $listTagStart = '';
} else {
$listTagStart = '';
}
diff --git a/View/Helper/MenuFormHelper.php b/View/Helper/MenuFormHelper.php
index e1b6b89..38d0198 100644
--- a/View/Helper/MenuFormHelper.php
+++ b/View/Helper/MenuFormHelper.php
@@ -143,7 +143,7 @@ public function checkboxMenuFramesPage($roomId, $room, $pageId, $menu, $rootRoom
'pageId' => $pageId,
'nest' => $nest,
//'displayWhenClicking' => $menu['Page']['lft'] + 1 !== (int)$menu['Page']['rght'],
- 'displayWhenClicking' => !(bool)$menu['Page']['child_count'],
+ 'displayWhenClicking' => (bool)$menu['Page']['child_count'],
'domChildPageIds' => $domChildPageIds,
'roomDisabled' => $roomDisabled,
'pageNameCss' => $this->_getPageNameCss($room, $pageId),
From a8ca1c2fa704b0a7236b94543042031466ffa4ab Mon Sep 17 00:00:00 2001
From: A11creATor-
Date: Fri, 12 Oct 2018 11:56:41 +0000
Subject: [PATCH 04/33] =?UTF-8?q?refs=20#1353=20#1354=20TestCode=E5=A4=89?=
=?UTF-8?q?=E6=9B=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Test/Case/View/Elements/Menus/header/IndexTest.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Test/Case/View/Elements/Menus/header/IndexTest.php b/Test/Case/View/Elements/Menus/header/IndexTest.php
index bb91eff..a388fb1 100644
--- a/Test/Case/View/Elements/Menus/header/IndexTest.php
+++ b/Test/Case/View/Elements/Menus/header/IndexTest.php
@@ -108,7 +108,7 @@ private function __assertLink($frameId, $pageId, $permalink, $active, $name, $ha
'<\/li>';
} elseif ($hasDropMark) {
$pattern =
- '' .
+ '' .
'' .
'' . $name . '<\/span> <\/span>' .
'<\/a>' .
From 3e65b322b2a64435dbcfd1407344217934872210 Mon Sep 17 00:00:00 2001
From: A11creATor-
Date: Fri, 12 Oct 2018 13:23:40 +0000
Subject: [PATCH 05/33] =?UTF-8?q?refs=20#1353=20#1354=20TestCode=E5=A4=89?=
=?UTF-8?q?=E6=9B=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Helper/MenuFormHelper/CheckboxMenuFramesPageTest.php | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Test/Case/View/Helper/MenuFormHelper/CheckboxMenuFramesPageTest.php b/Test/Case/View/Helper/MenuFormHelper/CheckboxMenuFramesPageTest.php
index 8cfc2ef..19ee9aa 100644
--- a/Test/Case/View/Helper/MenuFormHelper/CheckboxMenuFramesPageTest.php
+++ b/Test/Case/View/Helper/MenuFormHelper/CheckboxMenuFramesPageTest.php
@@ -188,8 +188,9 @@ public function testCheckboxMenuFramesPage($room, $menu, $pageTreeList, $nest, $
$this->assertInput('input',
'data[Menus][1][' . $pageId . '][MenuFramesPage][is_hidden]', '1', $result);
- $this->assertInput('input',
- 'data[Menus][1][' . $pageId . '][MenuFramesPage][folder_type]', '0', $result);
+ //$this->assertInput('input',
+ // 'data[Menus][1][' . $pageId . '][MenuFramesPage][folder_type]', '0', $result);
+ $this->assertTextNotContains('[folder_type]', $result);
}
}
From 8280956f9a9282611cb50b68d7d1734e053299bd Mon Sep 17 00:00:00 2001
From: A11creATor-
Date: Tue, 13 Nov 2018 02:11:43 +0000
Subject: [PATCH 06/33] refs #1371
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
アクティブなページにいるかどうかはpermalinkではなく、full_permalinkで判断するように変更
---
View/Helper/MenuHelper.php | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/View/Helper/MenuHelper.php b/View/Helper/MenuHelper.php
index b3c59a9..ea4cb8a 100644
--- a/View/Helper/MenuHelper.php
+++ b/View/Helper/MenuHelper.php
@@ -319,7 +319,7 @@ protected function _displayPage($pageId, $menu) {
* @return bool
*/
public function isActive($page) {
- return Current::read('Page.permalink') === (string)$page['Page']['permalink'];
+ return Current::read('Page.full_permalink') === (string)$page['Page']['full_permalink'];
}
/**
@@ -391,7 +391,6 @@ protected function _getIndent($treePageId, $page) {
if ($page['Page']['root_id'] === Page::PUBLIC_ROOT_PAGE_ID) {
$indent--;
}
-
return $indent;
}
From 7c9ac1f5c9880a8dc9020bd8b776c054c5f3a015 Mon Sep 17 00:00:00 2001
From: A11creATor-
Date: Wed, 14 Nov 2018 00:01:32 +0000
Subject: [PATCH 07/33] phpunit error fix
---
Test/Case/View/Elements/Menus/footer/IndexTest.php | 1 +
Test/Case/View/Elements/Menus/header/IndexTest.php | 1 +
Test/Case/View/Elements/Menus/major/IndexTest.php | 1 +
Test/Case/View/Elements/Menus/minor/IndexTest.php | 1 +
4 files changed, 4 insertions(+)
diff --git a/Test/Case/View/Elements/Menus/footer/IndexTest.php b/Test/Case/View/Elements/Menus/footer/IndexTest.php
index f52280f..d72ecef 100644
--- a/Test/Case/View/Elements/Menus/footer/IndexTest.php
+++ b/Test/Case/View/Elements/Menus/footer/IndexTest.php
@@ -66,6 +66,7 @@ public function testIndex() {
$frameId = '4';
Current::write('Page.id', '4');
Current::write('Page.permalink', 'home');
+ Current::write('Page.full_permalink', 'public/home');
//テスト実行
$this->_testGetAction('/test_menus/test_view_elements_menus_footer_index/index?frame_id=' . $frameId,
diff --git a/Test/Case/View/Elements/Menus/header/IndexTest.php b/Test/Case/View/Elements/Menus/header/IndexTest.php
index a388fb1..249ae27 100644
--- a/Test/Case/View/Elements/Menus/header/IndexTest.php
+++ b/Test/Case/View/Elements/Menus/header/IndexTest.php
@@ -66,6 +66,7 @@ public function testIndex() {
$frameId = '1';
Current::write('Page.id', '4');
Current::write('Page.permalink', 'home');
+ Current::write('Page.full_permalink', 'public/home');
//テスト実行
$this->_testGetAction('/test_menus/test_view_elements_menus_header_index/index?frame_id=' . $frameId,
diff --git a/Test/Case/View/Elements/Menus/major/IndexTest.php b/Test/Case/View/Elements/Menus/major/IndexTest.php
index 7a5e99d..384a9aa 100644
--- a/Test/Case/View/Elements/Menus/major/IndexTest.php
+++ b/Test/Case/View/Elements/Menus/major/IndexTest.php
@@ -66,6 +66,7 @@ public function testIndex() {
$frameId = '2';
Current::write('Page.id', '4');
Current::write('Page.permalink', 'home');
+ Current::write('Page.full_permalink', 'public/home');
//テスト実行
$this->_testGetAction('/test_menus/test_view_elements_menus_major_index/index?frame_id=' . $frameId,
diff --git a/Test/Case/View/Elements/Menus/minor/IndexTest.php b/Test/Case/View/Elements/Menus/minor/IndexTest.php
index 1c4042b..0eebd7e 100644
--- a/Test/Case/View/Elements/Menus/minor/IndexTest.php
+++ b/Test/Case/View/Elements/Menus/minor/IndexTest.php
@@ -66,6 +66,7 @@ public function testIndex() {
$frameId = '3';
Current::write('Page.id', '9');
Current::write('Page.permalink', 'page_1');
+ Current::write('Page.full_permalink', 'community/page_1');
//テスト実行
$this->_testGetAction('/test_menus/test_view_elements_menus_minor_index/index?frame_id=' . $frameId,
From b05a7a2a991301f62ef0b72c5ca848d68e3337f3 Mon Sep 17 00:00:00 2001
From: A11creATor-
Date: Wed, 14 Nov 2018 00:37:09 +0000
Subject: [PATCH 08/33] fix phpunit error
---
Test/Case/View/Elements/Menus/footer/IndexTest.php | 2 +-
Test/Case/View/Elements/Menus/header/IndexTest.php | 2 +-
Test/Case/View/Elements/Menus/major/IndexTest.php | 2 +-
Test/Case/View/Elements/Menus/minor/IndexTest.php | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Test/Case/View/Elements/Menus/footer/IndexTest.php b/Test/Case/View/Elements/Menus/footer/IndexTest.php
index d72ecef..30eca7c 100644
--- a/Test/Case/View/Elements/Menus/footer/IndexTest.php
+++ b/Test/Case/View/Elements/Menus/footer/IndexTest.php
@@ -66,7 +66,7 @@ public function testIndex() {
$frameId = '4';
Current::write('Page.id', '4');
Current::write('Page.permalink', 'home');
- Current::write('Page.full_permalink', 'public/home');
+ Current::write('Page.full_permalink', 'home');
//テスト実行
$this->_testGetAction('/test_menus/test_view_elements_menus_footer_index/index?frame_id=' . $frameId,
diff --git a/Test/Case/View/Elements/Menus/header/IndexTest.php b/Test/Case/View/Elements/Menus/header/IndexTest.php
index 249ae27..6e3220e 100644
--- a/Test/Case/View/Elements/Menus/header/IndexTest.php
+++ b/Test/Case/View/Elements/Menus/header/IndexTest.php
@@ -66,7 +66,7 @@ public function testIndex() {
$frameId = '1';
Current::write('Page.id', '4');
Current::write('Page.permalink', 'home');
- Current::write('Page.full_permalink', 'public/home');
+ Current::write('Page.full_permalink', 'home');
//テスト実行
$this->_testGetAction('/test_menus/test_view_elements_menus_header_index/index?frame_id=' . $frameId,
diff --git a/Test/Case/View/Elements/Menus/major/IndexTest.php b/Test/Case/View/Elements/Menus/major/IndexTest.php
index 384a9aa..07137b1 100644
--- a/Test/Case/View/Elements/Menus/major/IndexTest.php
+++ b/Test/Case/View/Elements/Menus/major/IndexTest.php
@@ -66,7 +66,7 @@ public function testIndex() {
$frameId = '2';
Current::write('Page.id', '4');
Current::write('Page.permalink', 'home');
- Current::write('Page.full_permalink', 'public/home');
+ Current::write('Page.full_permalink', 'home');
//テスト実行
$this->_testGetAction('/test_menus/test_view_elements_menus_major_index/index?frame_id=' . $frameId,
diff --git a/Test/Case/View/Elements/Menus/minor/IndexTest.php b/Test/Case/View/Elements/Menus/minor/IndexTest.php
index 0eebd7e..d07a7d2 100644
--- a/Test/Case/View/Elements/Menus/minor/IndexTest.php
+++ b/Test/Case/View/Elements/Menus/minor/IndexTest.php
@@ -66,7 +66,7 @@ public function testIndex() {
$frameId = '3';
Current::write('Page.id', '9');
Current::write('Page.permalink', 'page_1');
- Current::write('Page.full_permalink', 'community/page_1');
+ Current::write('Page.full_permalink', 'page_1');
//テスト実行
$this->_testGetAction('/test_menus/test_view_elements_menus_minor_index/index?frame_id=' . $frameId,
From 1bf7686bc07af3fce4b0bc37cc49e7d7ceb006b9 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Tue, 5 Mar 2019 09:40:26 +0900
Subject: [PATCH 09/33] =?UTF-8?q?=E3=82=A2=E3=82=AF=E3=83=86=E3=82=A3?=
=?UTF-8?q?=E3=83=96=E3=81=AA=E3=83=9A=E3=83=BC=E3=82=B8=E3=82=92full=5Fpe?=
=?UTF-8?q?rmalink=E3=81=A7=E5=88=A4=E6=96=AD=E3=81=A7=E3=81=AA=E3=81=8F?=
=?UTF-8?q?=E3=80=81page=5Fid=E3=81=A7=E8=A1=8C=E3=81=86=E3=82=88=E3=81=86?=
=?UTF-8?q?=E3=81=AB=E4=BF=AE=E6=AD=A3=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
View/Helper/MenuHelper.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/View/Helper/MenuHelper.php b/View/Helper/MenuHelper.php
index ea4cb8a..018b53b 100644
--- a/View/Helper/MenuHelper.php
+++ b/View/Helper/MenuHelper.php
@@ -319,7 +319,7 @@ protected function _displayPage($pageId, $menu) {
* @return bool
*/
public function isActive($page) {
- return Current::read('Page.full_permalink') === (string)$page['Page']['full_permalink'];
+ return Current::read('Page.id') === (string)$page['Page']['id'];
}
/**
From 364f3cef91eafcb52910a77db898862a741ab349 Mon Sep 17 00:00:00 2001
From: Mitsuru Mutaguchi
Date: Wed, 27 Mar 2019 17:07:02 +0900
Subject: [PATCH 10/33] =?UTF-8?q?fix:=20=E3=82=B3=E3=83=9F=E3=83=A5?=
=?UTF-8?q?=E3=83=8B=E3=83=86=E3=82=A3=E3=83=AB=E3=83=BC=E3=83=A0=E3=81=AE?=
=?UTF-8?q?=E9=9D=9E=E8=A1=A8=E7=A4=BA=E3=81=AB=E3=81=97=E3=81=A6=E3=82=82?=
=?UTF-8?q?=E3=80=81=E5=86=8D=E5=BA=A6=E7=B7=A8=E9=9B=86=E7=94=BB=E9=9D=A2?=
=?UTF-8?q?=E3=81=AB=E5=85=A5=E3=82=8B=E3=81=A8=E5=85=AC=E9=96=8B=E3=83=81?=
=?UTF-8?q?=E3=82=A7=E3=83=83=E3=82=AF=E3=81=8C=E5=85=A5=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/1473?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
View/Helper/MenuFormHelper.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/View/Helper/MenuFormHelper.php b/View/Helper/MenuFormHelper.php
index 38d0198..b4e67db 100644
--- a/View/Helper/MenuFormHelper.php
+++ b/View/Helper/MenuFormHelper.php
@@ -76,7 +76,7 @@ public function checkboxMenuFramesRoom($roomId, $room, $pageId) {
'div' => false,
'value' => '0',
'hiddenField' => '1',
- 'checked' => ! isset($this->_View->request->data[$prefixInput][$isHidden]),
+ 'checked' => ! Hash::get($this->_View->request->data, $prefixInput . '.' . $isHidden, false),
'ng-click' => 'disableChildPages($event, ' . json_encode($domChildPageIds) . ')',
));
$name = '';
From 9e81d3ca8258c3d2e4f32762a87f6b32d5d70d23 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Tue, 30 Jul 2019 20:30:18 +0900
Subject: [PATCH 11/33] =?UTF-8?q?change:=20=E6=8B=A1=E5=BC=B5=E3=81=97?=
=?UTF-8?q?=E3=82=88=E3=81=86=E3=81=A8=E3=81=99=E3=82=8B=E3=81=A8=E3=80=81?=
=?UTF-8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=AB=E3=81=AA=E3=82=8B=E3=81=9F?=
=?UTF-8?q?=E3=82=81=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
View/MenuFrameSettings/edit.ctp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/View/MenuFrameSettings/edit.ctp b/View/MenuFrameSettings/edit.ctp
index 0bc8ac8..d36e192 100644
--- a/View/MenuFrameSettings/edit.ctp
+++ b/View/MenuFrameSettings/edit.ctp
@@ -15,7 +15,7 @@
- element('MenuFrameSettings/edit_form'); ?>
+ element('Menus.MenuFrameSettings/edit_form'); ?>
From cece6c36a5cef117593af60c5e257a2b687d02fa Mon Sep 17 00:00:00 2001
From: Shohei Nakajima
Date: Thu, 1 Aug 2019 12:49:05 +0900
Subject: [PATCH 12/33] =?UTF-8?q?style:=20=E3=82=B3=E3=83=A1=E3=83=B3?=
=?UTF-8?q?=E3=83=88=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
View/MenuFrameSettings/edit.ctp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/View/MenuFrameSettings/edit.ctp b/View/MenuFrameSettings/edit.ctp
index d36e192..334dd1d 100644
--- a/View/MenuFrameSettings/edit.ctp
+++ b/View/MenuFrameSettings/edit.ctp
@@ -1,6 +1,6 @@
* @author Shohei Nakajima
From 09c75dd142fb2dad3a76afa1383ea8327ade8ca1 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sun, 1 Sep 2019 19:34:49 +0900
Subject: [PATCH 13/33] =?UTF-8?q?fix:=20test:=20UnitTest=E4=BF=AE=E6=AD=A3?=
=?UTF-8?q?=20https://github.com/NetCommons3/NetCommons3/issues/1468?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Test/Case/View/Elements/Menus/footer/IndexTest.php | 3 ---
Test/Case/View/Elements/Menus/header/IndexTest.php | 3 ---
Test/Case/View/Elements/Menus/major/IndexTest.php | 3 ---
Test/Case/View/Elements/Menus/minor/IndexTest.php | 3 ---
Test/Case/View/Helper/MenuFormHelper/BeforeRenderTest.php | 6 +-----
Test/Case/View/Helper/MenuHelper/LinkTest.php | 4 ++--
.../TestViewElementsMenusFooterIndexController.php | 8 ++++++++
.../TestViewElementsMenusHeaderIndexController.php | 6 ++++++
.../TestViewElementsMenusMajorIndexController.php | 6 ++++++
.../TestViewElementsMenusMinorIndexController.php | 8 ++++++++
10 files changed, 31 insertions(+), 19 deletions(-)
diff --git a/Test/Case/View/Elements/Menus/footer/IndexTest.php b/Test/Case/View/Elements/Menus/footer/IndexTest.php
index 30eca7c..d913b0d 100644
--- a/Test/Case/View/Elements/Menus/footer/IndexTest.php
+++ b/Test/Case/View/Elements/Menus/footer/IndexTest.php
@@ -64,9 +64,6 @@ public function setUp() {
*/
public function testIndex() {
$frameId = '4';
- Current::write('Page.id', '4');
- Current::write('Page.permalink', 'home');
- Current::write('Page.full_permalink', 'home');
//テスト実行
$this->_testGetAction('/test_menus/test_view_elements_menus_footer_index/index?frame_id=' . $frameId,
diff --git a/Test/Case/View/Elements/Menus/header/IndexTest.php b/Test/Case/View/Elements/Menus/header/IndexTest.php
index 6e3220e..6f34703 100644
--- a/Test/Case/View/Elements/Menus/header/IndexTest.php
+++ b/Test/Case/View/Elements/Menus/header/IndexTest.php
@@ -64,9 +64,6 @@ public function setUp() {
*/
public function testIndex() {
$frameId = '1';
- Current::write('Page.id', '4');
- Current::write('Page.permalink', 'home');
- Current::write('Page.full_permalink', 'home');
//テスト実行
$this->_testGetAction('/test_menus/test_view_elements_menus_header_index/index?frame_id=' . $frameId,
diff --git a/Test/Case/View/Elements/Menus/major/IndexTest.php b/Test/Case/View/Elements/Menus/major/IndexTest.php
index 07137b1..e1c23d5 100644
--- a/Test/Case/View/Elements/Menus/major/IndexTest.php
+++ b/Test/Case/View/Elements/Menus/major/IndexTest.php
@@ -64,9 +64,6 @@ public function setUp() {
*/
public function testIndex() {
$frameId = '2';
- Current::write('Page.id', '4');
- Current::write('Page.permalink', 'home');
- Current::write('Page.full_permalink', 'home');
//テスト実行
$this->_testGetAction('/test_menus/test_view_elements_menus_major_index/index?frame_id=' . $frameId,
diff --git a/Test/Case/View/Elements/Menus/minor/IndexTest.php b/Test/Case/View/Elements/Menus/minor/IndexTest.php
index d07a7d2..06c8ebe 100644
--- a/Test/Case/View/Elements/Menus/minor/IndexTest.php
+++ b/Test/Case/View/Elements/Menus/minor/IndexTest.php
@@ -64,9 +64,6 @@ public function setUp() {
*/
public function testIndex() {
$frameId = '3';
- Current::write('Page.id', '9');
- Current::write('Page.permalink', 'page_1');
- Current::write('Page.full_permalink', 'page_1');
//テスト実行
$this->_testGetAction('/test_menus/test_view_elements_menus_minor_index/index?frame_id=' . $frameId,
diff --git a/Test/Case/View/Helper/MenuFormHelper/BeforeRenderTest.php b/Test/Case/View/Helper/MenuFormHelper/BeforeRenderTest.php
index fbf380f..516d9f6 100644
--- a/Test/Case/View/Helper/MenuFormHelper/BeforeRenderTest.php
+++ b/Test/Case/View/Helper/MenuFormHelper/BeforeRenderTest.php
@@ -62,12 +62,8 @@ public function testBeforeRender() {
$pattern = '/' . preg_quote('View/Helper/TestMenuFormHelperBeforeRender', '/') . '/';
$this->assertRegExp($pattern, $this->view);
- //cssのURLチェック
- $pattern = '//';
- $this->assertRegExp($pattern, $this->contents);
-
//scriptのURLチェック
- $pattern = '//';
+ $pattern = '//';
$this->assertRegExp($pattern, $this->contents);
}
diff --git a/Test/Case/View/Helper/MenuHelper/LinkTest.php b/Test/Case/View/Helper/MenuHelper/LinkTest.php
index 9d2cb36..ac04b6f 100644
--- a/Test/Case/View/Helper/MenuHelper/LinkTest.php
+++ b/Test/Case/View/Helper/MenuHelper/LinkTest.php
@@ -259,7 +259,7 @@ public function testLinkToggle() {
*/
public function testLinkWithSettingMode() {
//Helperロード
- Current::isSettingMode(true);
+ Current::setSettingMode(true);
$viewVars = $this->__getViewVars('4');
$requestData = array();
$params = array();
@@ -285,7 +285,7 @@ public function testLinkWithSettingMode() {
);
$this->assertEquals($expected, $result);
- Current::isSettingMode(false);
+ Current::setSettingMode(false);
}
}
diff --git a/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusFooterIndexController.php b/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusFooterIndexController.php
index 0b92768..7becbb1 100644
--- a/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusFooterIndexController.php
+++ b/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusFooterIndexController.php
@@ -10,6 +10,7 @@
*/
App::uses('MenusController', 'Menus.Controller');
+App::uses('Container', 'Containers.Model');
/**
* View/Elements/Menus/footer/indexテスト用Controller
@@ -39,6 +40,13 @@ class TestViewElementsMenusFooterIndexController extends MenusController {
*/
public function index() {
$this->autoRender = true;
+
+ Current::write('Frame.id', $this->request->query['frame_id']);
+ Current::write('Frame.header_type', 'default');
+ Current::write('Frame.plugin_key', 'menus');
+ Current::write('Page.id', '4');
+ Current::write('PageContainer.container_type', Container::TYPE_FOOTER);
+
parent::index();
}
diff --git a/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusHeaderIndexController.php b/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusHeaderIndexController.php
index 7994d99..8e25aad 100644
--- a/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusHeaderIndexController.php
+++ b/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusHeaderIndexController.php
@@ -41,6 +41,12 @@ public function index() {
$this->request->params['plugin'] = 'menus';
$this->request->params['controller'] = 'menus';
$this->autoRender = true;
+
+ Current::write('Frame.id', $this->request->query['frame_id']);
+ Current::write('Frame.header_type', 'default');
+ Current::write('Frame.plugin_key', 'menus');
+ Current::write('Page.id', '4');
+
parent::index();
}
diff --git a/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusMajorIndexController.php b/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusMajorIndexController.php
index a2b939e..c6d7183 100644
--- a/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusMajorIndexController.php
+++ b/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusMajorIndexController.php
@@ -39,6 +39,12 @@ class TestViewElementsMenusMajorIndexController extends MenusController {
*/
public function index() {
$this->autoRender = true;
+
+ Current::write('Frame.id', $this->request->query['frame_id']);
+ Current::write('Frame.header_type', 'default');
+ Current::write('Frame.plugin_key', 'menus');
+ Current::write('Page.id', '4');
+
parent::index();
}
diff --git a/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusMinorIndexController.php b/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusMinorIndexController.php
index a53e8a2..9f3329a 100644
--- a/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusMinorIndexController.php
+++ b/Test/test_app/Plugin/TestMenus/Controller/TestViewElementsMenusMinorIndexController.php
@@ -10,6 +10,7 @@
*/
App::uses('MenusController', 'Menus.Controller');
+App::uses('Container', 'Containers.Model');
/**
* View/Elements/Menus/minor/indexテスト用Controller
@@ -41,6 +42,13 @@ public function index() {
$this->request->params['plugin'] = 'menus';
$this->request->params['controller'] = 'menus';
$this->autoRender = true;
+
+ Current::write('Frame.id', $this->request->query['frame_id']);
+ Current::write('Frame.header_type', 'default');
+ Current::write('Frame.plugin_key', 'menus');
+ Current::write('Page.id', '9');
+ Current::write('PageContainer.container_type', Container::TYPE_MINOR);
+
parent::index();
}
From 694d49dfb4684e37bbea5e35872aa3745c9143cb Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sun, 1 Sep 2019 19:36:50 +0900
Subject: [PATCH 14/33] =?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 cf653bc..3764e71 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:
matrix:
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 524bb93..eb87c15 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -14,6 +14,5 @@
-
From 2144706a0f035d523432fc77f2fbbdfdaf21d1a8 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Tue, 10 Mar 2020 09:44:47 +0900
Subject: [PATCH 15/33] =?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 3764e71..b88aa2c 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 cc883b94d2d11d0ee4a14f38d293cfce2d8373e2 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Fri, 7 Aug 2020 22:39:33 +0900
Subject: [PATCH 16/33] =?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 b88aa2c..50ad596 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 eb87c15..1681711 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,5 +1,11 @@
+
+
+
+
+
+
app/Plugin/Menus
From b2640a7293bc6be7f43b5e87346982658a1bd749 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Wed, 26 Aug 2020 20:19:52 +0900
Subject: [PATCH 17/33] 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 550d8128054b2d55968132d4c4868182e652f4b3 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sun, 13 Dec 2020 18:31:55 +0900
Subject: [PATCH 18/33] =?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 50ad596..965048b 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 61f9f97f375784738909ecfac58c0b4b1d7c3c27 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sat, 23 Jan 2021 13:59:27 +0900
Subject: [PATCH 19/33] =?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 5d32e30f950082f289ea119b20628da91b64af25 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sat, 23 Jan 2021 13:59:33 +0900
Subject: [PATCH 20/33] 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 09177ed0226810904d1d2fb6b2e88e58354197eb Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Mon, 1 Mar 2021 17:04:33 +0900
Subject: [PATCH 21/33] =?UTF-8?q?fix:=20=E3=83=91=E3=83=96=E3=83=AA?=
=?UTF-8?q?=E3=83=83=E3=82=AF=E3=82=92=E5=85=A8OFF=E3=81=AB=E3=81=97?=
=?UTF-8?q?=E3=81=9F=E5=A0=B4=E5=90=88=E3=80=81=E3=83=9A=E3=83=BC=E3=82=B8?=
=?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=99=E3=82=8B=E3=81=A8=E3=80=81?=
=?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=9F=E3=83=9A=E3=83=BC=E3=82=B8?=
=?UTF-8?q?=E3=81=8C=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=A6=E3=81=97?=
=?UTF-8?q?=E3=81=BE=E3=81=86=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3=20https:?=
=?UTF-8?q?//github.com/NetCommons3/NetCommons3/issues/1559?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Controller/MenuFrameSettingsController.php | 8 ++++++++
View/Helper/MenuFormHelper.php | 13 ++++++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/Controller/MenuFrameSettingsController.php b/Controller/MenuFrameSettingsController.php
index 08bf03f..e8ac5ac 100644
--- a/Controller/MenuFrameSettingsController.php
+++ b/Controller/MenuFrameSettingsController.php
@@ -119,6 +119,14 @@ public function edit() {
//不要パラメータ除去
unset($this->request->data['save']);
//登録処理
+ foreach ($this->request->data['MenuRooms'] as $i => $menuRoom) {
+ $roomId = $menuRoom['MenuFramesRoom']['room_id'] ?? null;
+ $pageId = $menuRoom['MenuFramesRoom']['page_id_top'] ?? null;
+ $isHidden =
+ $this->request->data['Menus'][$roomId][$pageId]['MenuFramesPage']['is_hidden'] ?? null;
+ $this->request->data['MenuRooms'][$i]['MenuFramesRoom']['is_hidden'] = $isHidden;
+ }
+
if ($this->MenuFrameSetting->saveMenuFrameSetting($this->request->data)) {
return $this->redirect(NetCommonsUrl::backToPageUrl());
}
diff --git a/View/Helper/MenuFormHelper.php b/View/Helper/MenuFormHelper.php
index b4e67db..285a382 100644
--- a/View/Helper/MenuFormHelper.php
+++ b/View/Helper/MenuFormHelper.php
@@ -117,7 +117,7 @@ public function checkboxMenuFramesPage($roomId, $room, $pageId, $menu, $rootRoom
}
list($roomPrefixInput, $roomIsHidden, ) = $this->_getRoomPrefix($rootRoomId, $rootRoom);
- $roomDisabled = isset($this->_View->request->data[$roomPrefixInput][$roomIsHidden]);
+ $roomDisabled = Hash::get($this->_View->request->data, $roomPrefixInput)[$roomIsHidden] ?? null;
$prefixInput = 'Menus.' . $roomId . '.' . $pageId . '.MenuFramesPage';
@@ -192,6 +192,17 @@ protected function _getRoomPrefix($roomId, $room) {
$pageIdTop = Space::getPageIdSpace(Space::PUBLIC_SPACE_ID);
}
+ $prefixInput = 'MenuRooms.' . $roomId . '.MenuFramesRoom';
+ $html .= $this->NetCommonsForm->hidden($prefixInput . '.id');
+ $html .= $this->NetCommonsForm->hidden($prefixInput . '.frame_key',
+ array('value' => $this->_View->request->data['Frame']['key']));
+ $html .= $this->NetCommonsForm->hidden(
+ $prefixInput . '.page_id_top', array('value' => $pageIdTop)
+ );
+ $html .= $this->NetCommonsForm->hidden(
+ $prefixInput . '.room_id', array('value' => $roomId)
+ );
+
$prefixInput = 'Menus.' . $roomId . '.' . $pageIdTop . '.MenuFramesPage';
$isFidden = 'is_hidden';
From 6d5a895e39b4c256717d68cfa47f71b46df2efd2 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Mon, 15 Mar 2021 16:12:44 +0900
Subject: [PATCH 22/33] =?UTF-8?q?fix:=20=E4=B8=80=E3=81=A4=E3=82=82?=
=?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E3=83=9A=E3=83=BC=E3=82=B8?=
=?UTF-8?q?=E3=81=8C=E3=81=AA=E3=81=84=E5=A0=B4=E5=90=88=E3=80=81=E4=BD=99?=
=?UTF-8?q?=E8=A8=88=E3=81=AA=E3=82=B9=E3=83=9A=E3=83=BC=E3=82=B9=E3=81=8C?=
=?UTF-8?q?=E3=81=A7=E3=81=8D=E3=81=A6=E3=81=97=E3=81=BE=E3=81=86=E3=81=9F?=
=?UTF-8?q?=E3=82=81=E4=BF=AE=E6=AD=A3=20https://github.com/NetCommons3/Ne?=
=?UTF-8?q?tCommons3/issues/1559?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
View/Menus/index.ctp | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/View/Menus/index.ctp b/View/Menus/index.ctp
index 25ec9cf..8146601 100644
--- a/View/Menus/index.ctp
+++ b/View/Menus/index.ctp
@@ -10,8 +10,9 @@
* @copyright Copyright 2014, NetCommons Project
*/
?>
-
-
-
+';
+ echo $this->Menu->renderMain();
+ echo '';
+}
\ No newline at end of file
From b57a69959f97f455ab65c539e6728575cbdc2c92 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sat, 1 May 2021 21:11:09 +0900
Subject: [PATCH 23/33] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E3=81=97?=
=?UTF-8?q?=E3=81=9F=E3=81=93=E3=81=A8=E3=81=AB=E3=82=88=E3=82=8A=E3=80=81?=
=?UTF-8?q?menu=5Fframes=5Frooms=E3=83=86=E3=83=BC=E3=83=96=E3=83=AB?=
=?UTF-8?q?=E3=81=AB=E3=83=87=E3=83=BC=E3=82=BF=E3=81=8C=E5=AD=98=E5=9C=A8?=
=?UTF-8?q?=E3=81=99=E3=82=8B=E3=81=93=E3=81=A8=E3=81=AB=E3=81=AA=E3=81=A3?=
=?UTF-8?q?=E3=81=9F=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3=20https://github.?=
=?UTF-8?q?com/NetCommons3/NetCommons3/issues/1559?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Controller/MenusController.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Controller/MenusController.php b/Controller/MenusController.php
index 7512473..51b3c74 100644
--- a/Controller/MenusController.php
+++ b/Controller/MenusController.php
@@ -81,7 +81,7 @@ public function index() {
)
));
- if ($count1 && $count2) {
+ if (!$count1 && $count2) {
$options = array(
MenuFrameSetting::DISPLAY_TYPE_HEADER,
MenuFrameSetting::DISPLAY_TYPE_FOOTER,
From 84a24ba34e1e6fb5ee895d4c2fd85b6f46cd57fc Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sat, 31 Jul 2021 10:46:34 +0900
Subject: [PATCH 24/33] =?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 | 42 -----------
README.md | 13 ++--
phpunit.xml.dist | 4 +-
4 files changed, 142 insertions(+), 54 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 965048b..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-language: php
-
-php:
- - 7.0
- - 7.1
- - 7.2
- - 7.3.24
- - 7.4
-
-sudo: false
-dist: trusty
-
-env:
- matrix:
- - NETCOMMONS_VERSION=master DB=mysql
- global:
- - secure: "tRLhQkdKz4sHxMo/HDEl04RWb4/S/7f8OiElsxQEW1PEGqi2QNAhPlUauMCchaSvTJc2rp8bMq+Qmken7NkmkURgC3N/1UbYcOsFlVm2SX8hIztgXBXbLtNNy9vv18xthV9qXqlG1SUaTJqJasHS/YUJHsq3nV9OhQYCybJE0vA="
- - GIT_COMMITTER_NAME=s-nakajima
- - GIT_COMMITTER_EMAIL=nakajimashouhei@gmail.com
- - GIT_AUTHOR_NAME=s-nakajima
- - GIT_AUTHOR_EMAIL=nakajimashouhei@gmail.com
-
-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 03e4ea0..02f036e 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,6 @@
-Menus
+Menus
=====
-Menus for NetCommons3
-
-[](https://travis-ci.org/NetCommons3/Menus)
-[](https://coveralls.io/r/NetCommons3/Menus?branch=master)
-
-| dependencies | status |
-| ------------ | ------ |
-| composer.json | [](https://www.versioneye.com/user/projects/53e35a2de0a229603f00006f) |
+[](https://github.com/NetCommons3/Menus/actions/workflows/tests.yml)
+[](https://coveralls.io/r/NetCommons3/Menus?branch=master)
+[](https://packagist.org/packages/netcommons/menus)
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 1681711..6ba8a27 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -3,9 +3,6 @@
-
-
-
app/Plugin/Menus
@@ -20,5 +17,6 @@
+
From 6cad17cec6c5a64f4fe16454e93129b4ee3af5eb Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Wed, 11 Aug 2021 10:46:50 +0900
Subject: [PATCH 25/33] =?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 92e663cea7184dcf84ab8ee0ce93c99e2ac4dd00 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Fri, 13 Aug 2021 16:28:20 +0900
Subject: [PATCH 26/33] 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 9268fd7163c362e44c2d8e2d886b1ffa09a9315f Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Fri, 11 Feb 2022 20:03:34 +0900
Subject: [PATCH 27/33] 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 56b201d41d1130282f5d17e45b682cba4cb62c78 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sun, 19 Feb 2023 21:13:49 +0900
Subject: [PATCH 28/33] =?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 | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 1477ea2..9501566 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -48,6 +48,9 @@ jobs:
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 +61,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 1d91e6a9a40b8c890cf8864c5fbe95aefcfda709 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sun, 19 Feb 2023 21:14:21 +0900
Subject: [PATCH 29/33] =?UTF-8?q?test:=20PHPUnit=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
---
.../GetMenuFrameSettingTest.php | 2 ++
.../SaveMenuFrameSettingTest.php | 1 +
Test/Case/Model/MenuFrameSetting/SaveTest.php | 1 +
Test/Fixture/MenuFrameSettingFixture.php | 34 ++++++++-----------
Test/Fixture/MenuFramesPageFixture.php | 31 ++++++-----------
Test/Fixture/MenuFramesRoomFixture.php | 30 ++++++----------
6 files changed, 39 insertions(+), 60 deletions(-)
diff --git a/Test/Case/Model/MenuFrameSetting/GetMenuFrameSettingTest.php b/Test/Case/Model/MenuFrameSetting/GetMenuFrameSettingTest.php
index 12c3e7c..344b248 100644
--- a/Test/Case/Model/MenuFrameSetting/GetMenuFrameSettingTest.php
+++ b/Test/Case/Model/MenuFrameSetting/GetMenuFrameSettingTest.php
@@ -66,6 +66,7 @@ public function dataProvider() {
'id' => '2',
'frame_key' => 'frame_2',
'display_type' => 'major',
+ 'is_private_room_hidden' => null,
'created_user' => null,
'created' => null,
'modified_user' => null,
@@ -74,6 +75,7 @@ public function dataProvider() {
array('frameKey' => 'frame_8', 'expected' => array(
'frame_key' => 'frame_8',
'display_type' => 'major',
+ 'is_private_room_hidden' => null,
'created_user' => null,
'created' => null,
'modified_user' => null,
diff --git a/Test/Case/Model/MenuFrameSetting/SaveMenuFrameSettingTest.php b/Test/Case/Model/MenuFrameSetting/SaveMenuFrameSettingTest.php
index f45155d..ca34f35 100644
--- a/Test/Case/Model/MenuFrameSetting/SaveMenuFrameSettingTest.php
+++ b/Test/Case/Model/MenuFrameSetting/SaveMenuFrameSettingTest.php
@@ -63,6 +63,7 @@ private function __data() {
'id' => '3',
'frame_key' => 'frame_3',
'display_type' => 'major',
+ 'is_private_room_hidden' => null,
),
);
diff --git a/Test/Case/Model/MenuFrameSetting/SaveTest.php b/Test/Case/Model/MenuFrameSetting/SaveTest.php
index 59f2aab..c93246c 100644
--- a/Test/Case/Model/MenuFrameSetting/SaveTest.php
+++ b/Test/Case/Model/MenuFrameSetting/SaveTest.php
@@ -63,6 +63,7 @@ private function __data() {
'id' => '3',
'frame_key' => 'frame_3',
'display_type' => 'major',
+ 'is_private_room_hidden' => null,
),
'Menus' => array(
1 => array(
diff --git a/Test/Fixture/MenuFrameSettingFixture.php b/Test/Fixture/MenuFrameSettingFixture.php
index 6f13ec5..e09e084 100644
--- a/Test/Fixture/MenuFrameSettingFixture.php
+++ b/Test/Fixture/MenuFrameSettingFixture.php
@@ -17,25 +17,6 @@
*/
class MenuFrameSettingFixture extends CakeTestFixture {
-/**
- * Fields
- *
- * @var array
- */
- public $fields = array(
- 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary', 'comment' => 'ID'),
- 'frame_key' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'フレームKey', 'charset' => 'utf8'),
- 'display_type' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'bootstrap navi type', 'charset' => 'utf8'),
- 'created_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'comment' => '作成者'),
- 'created' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '作成日時'),
- 'modified_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'comment' => '更新者'),
- 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '更新日時'),
- 'indexes' => array(
- 'PRIMARY' => array('column' => 'id', 'unique' => 1)
- ),
- 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
- );
-
/**
* Records
*
@@ -46,27 +27,42 @@ class MenuFrameSettingFixture extends CakeTestFixture {
'id' => '1',
'frame_key' => 'frame_1',
'display_type' => 'header',
+ 'is_private_room_hidden' => null,
),
array(
'id' => '2',
'frame_key' => 'frame_2',
'display_type' => 'major',
+ 'is_private_room_hidden' => null,
),
array(
'id' => '3',
'frame_key' => 'frame_3',
'display_type' => 'major',
+ 'is_private_room_hidden' => null,
),
array(
'id' => '4',
'frame_key' => 'frame_4',
'display_type' => 'minor',
+ 'is_private_room_hidden' => null,
),
array(
'id' => '5',
'frame_key' => 'frame_5',
'display_type' => 'footer',
+ 'is_private_room_hidden' => null,
),
);
+/**
+ * Initialize the fixture.
+ *
+ * @return void
+ */
+ public function init() {
+ require_once App::pluginPath('Menus') . 'Config' . DS . 'Schema' . DS . 'schema.php';
+ $this->fields = (new MenusSchema())->tables[Inflector::tableize($this->name)];
+ parent::init();
+ }
}
diff --git a/Test/Fixture/MenuFramesPageFixture.php b/Test/Fixture/MenuFramesPageFixture.php
index bed6072..c78ae31 100644
--- a/Test/Fixture/MenuFramesPageFixture.php
+++ b/Test/Fixture/MenuFramesPageFixture.php
@@ -17,27 +17,6 @@
*/
class MenuFramesPageFixture extends CakeTestFixture {
-/**
- * Fields
- *
- * @var array
- */
- public $fields = array(
- 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'),
- 'frame_key' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
- 'page_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false),
- 'is_hidden' => array('type' => 'boolean', 'null' => true, 'default' => null),
- 'folder_type' => array('type' => 'boolean', 'null' => true, 'default' => null),
- 'created_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'comment' => '作成者'),
- 'created' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '作成日時'),
- 'modified_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'comment' => '更新者'),
- 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '更新日時'),
- 'indexes' => array(
- 'PRIMARY' => array('column' => 'id', 'unique' => 1)
- ),
- 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
- );
-
/**
* Records
*
@@ -53,4 +32,14 @@ class MenuFramesPageFixture extends CakeTestFixture {
),
);
+/**
+ * Initialize the fixture.
+ *
+ * @return void
+ */
+ public function init() {
+ require_once App::pluginPath('Menus') . 'Config' . DS . 'Schema' . DS . 'schema.php';
+ $this->fields = (new MenusSchema())->tables[Inflector::tableize($this->name)];
+ parent::init();
+ }
}
diff --git a/Test/Fixture/MenuFramesRoomFixture.php b/Test/Fixture/MenuFramesRoomFixture.php
index d4da9a3..e8c5437 100644
--- a/Test/Fixture/MenuFramesRoomFixture.php
+++ b/Test/Fixture/MenuFramesRoomFixture.php
@@ -17,26 +17,6 @@
*/
class MenuFramesRoomFixture extends CakeTestFixture {
-/**
- * Fields
- *
- * @var array
- */
- public $fields = array(
- 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'),
- 'frame_key' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
- 'room_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false),
- 'is_hidden' => array('type' => 'boolean', 'null' => true, 'default' => null),
- 'created_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'comment' => '作成者 | '),
- 'created' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '作成日時'),
- 'modified_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'comment' => '更新者 | '),
- 'modified' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '更新日時'),
- 'indexes' => array(
- 'PRIMARY' => array('column' => 'id', 'unique' => 1)
- ),
- 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
- );
-
/**
* Records
*
@@ -51,4 +31,14 @@ class MenuFramesRoomFixture extends CakeTestFixture {
),
);
+/**
+ * Initialize the fixture.
+ *
+ * @return void
+ */
+ public function init() {
+ require_once App::pluginPath('Menus') . 'Config' . DS . 'Schema' . DS . 'schema.php';
+ $this->fields = (new MenusSchema())->tables[Inflector::tableize($this->name)];
+ parent::init();
+ }
}
From a006a5bb545122a669c7cf7dfca07eb6913cfb88 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Fri, 24 Feb 2023 14:58:50 +0900
Subject: [PATCH 30/33] =?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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 9501566..7cfa881 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -44,6 +44,7 @@ jobs:
MYSQL_VERSION: ${{ matrix.mysql }}
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: cakephp_test
+ COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
From 78627d96d191fbf9691fddd98607306bbad2648f Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sun, 26 Feb 2023 01:22:33 +0900
Subject: [PATCH 31/33] 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 d1daff4ab399c351be228af6e4a73756aec573c6 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Thu, 5 Oct 2023 19:18:44 +0900
Subject: [PATCH 32/33] =?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 | 36 +++++++++++++++++++++---------------
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 7cfa881..6da4321 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -3,22 +3,21 @@ on:
branches:
- main
- master
- - availability
pull_request:
branches:
- main
- master
- - availability
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
+ if: env.SLACK_WEBHOOK != ''
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }}
SLACK_CHANNEL: notify-nc3-tests
@@ -28,7 +27,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 +91,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
@@ -139,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
@@ -148,13 +154,13 @@ jobs:
teardown:
name: teardown
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-latest
needs: tests
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 17d41407d5212f8d3d0464755fba480991a0c15b Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Mon, 9 Oct 2023 19:06:38 +0900
Subject: [PATCH 33/33] 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