From 1251518c1cfbda753eef0c6b57d90b9bb3e72cf5 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 10 Jan 2023 14:23:04 +0900 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=E5=A4=9A=E8=A8=80=E8=AA=9E=E3=81=AE?= =?UTF-8?q?=E3=82=B5=E3=82=A4=E3=83=88=E3=81=A7=E3=80=81=E7=89=87=E6=96=B9?= =?UTF-8?q?=E3=81=AE=E8=A8=80=E8=AA=9E=E3=83=9A=E3=83=BC=E3=82=B8=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4=E3=81=99=E3=82=8B=E6=A9=9F=E8=83=BD=E3=81=AB?= =?UTF-8?q?=E3=83=90=E3=82=B0=E3=81=8C=E3=81=82=E3=82=8A=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=81=A8=E3=81=AA=E3=82=8B=E3=80=82=E3=81=9F=E3=81=A0?= =?UTF-8?q?=E3=80=81=E5=BD=93=E6=A9=9F=E8=83=BD=E3=81=AF=E3=81=BB=E3=81=BC?= =?UTF-8?q?=E4=BD=BF=E3=82=8F=E3=82=8C=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=81=9F=E3=82=81=E3=81=93=E3=81=AE=E6=A9=9F=E8=83=BD=E8=87=AA?= =?UTF-8?q?=E4=BD=93=E3=82=92=E6=B6=88=E3=81=99=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/PagesEditController.php | 31 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/Controller/PagesEditController.php b/Controller/PagesEditController.php index 6c05370..d648467 100644 --- a/Controller/PagesEditController.php +++ b/Controller/PagesEditController.php @@ -660,21 +660,22 @@ private function __hasDeletePage() { * @return bool */ private function __hasDeleteThisPage() { - $activeLangs = $this->Language->getLanguages(); - if (! Current::read('Space.is_m17n') && count($activeLangs) <= 1) { - return false; - } - - $hasDeletePage = $this->__hasDeletePage(); - if (! $hasDeletePage) { - return false; - } - - $activeLangIds = Hash::extract($activeLangs, '{n}.Language.id'); - - $pageIdsM17n = $this->Page->getPageIdsWithM17n(Current::read('Page.id')); - - return (bool)array_diff($activeLangIds, Hash::get($pageIdsM17n, Current::read('Page.id'), [])); + return false; + //$activeLangs = $this->Language->getLanguages(); + //if (! Current::read('Space.is_m17n') && count($activeLangs) <= 1) { + // return false; + //} + // + //$hasDeletePage = $this->__hasDeletePage(); + //if (! $hasDeletePage) { + // return false; + //} + // + //$activeLangIds = Hash::extract($activeLangs, '{n}.Language.id'); + // + //$pageIdsM17n = $this->Page->getPageIdsWithM17n(Current::read('Page.id')); + // + //return (bool)array_diff($activeLangIds, Hash::get($pageIdsM17n, Current::read('Page.id'), [])); } } From f2c7174e0b47cffa5f7e23af7ae9f96155d3dc5c Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 24 Feb 2023 15:56:43 +0900 Subject: [PATCH 2/5] =?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 df14699342c738b19d60943dd9fc7ad98bb13168 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sun, 26 Feb 2023 03:45:41 +0900 Subject: [PATCH 3/5] 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 cd5e74931bfca20092dc72ca51c4256b41a1084d Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Thu, 5 Oct 2023 19:40:24 +0900 Subject: [PATCH 4/5] =?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 61d61d29d6cfc1e4cb28ea9c8fa2247e23755b23 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 9 Oct 2023 21:03:04 +0900 Subject: [PATCH 5/5] 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