Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 16 additions & 15 deletions Controller/PagesEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'), []));
}

}
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.5
3.3.6