diff --git a/.github/workflows/appbuild.yml b/.github/workflows/appbuild.yml index 6a054affa..95a945b73 100644 --- a/.github/workflows/appbuild.yml +++ b/.github/workflows/appbuild.yml @@ -24,7 +24,7 @@ jobs: - name: Set up npm7 run: npm i -g npm@7 - name: Setup PHP - uses: shivammathur/setup-php@2.33.0 + uses: shivammathur/setup-php@2.34.1 with: php-version: '7.4' tools: composer diff --git a/.github/workflows/appstore-build-publish.yml b/.github/workflows/appstore-build-publish.yml index c39c5f541..882b4af39 100644 --- a/.github/workflows/appstore-build-publish.yml +++ b/.github/workflows/appstore-build-publish.yml @@ -87,7 +87,7 @@ jobs: filename: ${{ env.APP_NAME }}/appinfo/info.xml - name: Set up php ${{ steps.php-versions.outputs.php-min }} - uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 + uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1 with: php-version: ${{ steps.php-versions.outputs.php-min }} coverage: none diff --git a/.github/workflows/cypress-e2e.yml b/.github/workflows/cypress-e2e.yml index 396cf316c..a01092af4 100644 --- a/.github/workflows/cypress-e2e.yml +++ b/.github/workflows/cypress-e2e.yml @@ -91,7 +91,7 @@ jobs: restore-keys: ${{ steps.extcache.outputs.key }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@2.33.0 + uses: shivammathur/setup-php@2.34.1 with: php-version: ${{ matrix.php-versions }} extensions: ${{ env.extensions }} diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 26fdb9aa6..1519f74eb 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -78,7 +78,7 @@ jobs: path: apps/activity - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@2.33.0 + uses: shivammathur/setup-php@2.34.1 with: php-version: ${{ matrix.php-versions }} extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, mysql, pdo_mysql, pgsql, pdo_pgsql, apcu, gd diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index a1a246fd8..14e401869 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -34,7 +34,7 @@ jobs: uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1 - name: Set up php${{ steps.versions.outputs.php-min }} - uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 + uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1 with: php-version: ${{ steps.versions.outputs.php-min }} extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index 94de4b5fc..9e2de3035 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -48,7 +48,7 @@ jobs: persist-credentials: false - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 + uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1 with: php-version: ${{ matrix.php-versions }} extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index 326d1783d..3658b3827 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -103,7 +103,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 + uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml index ef8e6c264..24508acc4 100644 --- a/.github/workflows/phpunit-pgsql.yml +++ b/.github/workflows/phpunit-pgsql.yml @@ -106,7 +106,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 + uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index 129873300..cb7d21c0b 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -95,7 +95,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 + uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index ea4ad93e9..45a5a90b7 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -36,7 +36,7 @@ jobs: run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml - name: Set up php${{ steps.versions.outputs.php-min }} - uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 + uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1 with: php-version: ${{ steps.versions.outputs.php-min }} extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml index c5c80d842..793a75e25 100644 --- a/.github/workflows/update-nextcloud-ocp.yml +++ b/.github/workflows/update-nextcloud-ocp.yml @@ -38,7 +38,7 @@ jobs: - name: Set up php8.2 if: steps.checkout.outcome == 'success' - uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 + uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1 with: php-version: 8.2 # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation diff --git a/appinfo/info.xml b/appinfo/info.xml index 49da0f238..c7fc3da44 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -62,6 +62,7 @@ OCA\Deck\Command\UserExport OCA\Deck\Command\BoardImport OCA\Deck\Command\TransferOwnership + OCA\Deck\Command\CalendarToggle diff --git a/composer.json b/composer.json index f359d91b5..cb0478272 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,8 @@ "phpunit/phpunit": "^9", "nextcloud/coding-standard": "^1.1", "nextcloud/ocp": "dev-master", - "psalm/phar": "^5.13" + "psalm/phar": "^5.13", + "friendsofphp/php-cs-fixer": "*" }, "config": { "optimize-autoloader": true, diff --git a/composer.lock b/composer.lock index 42f057bef..9f25c7a3f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6950663d9d213151028e780637480220", + "content-hash": "2a3a67d1b7c70fe1cee2183c26b0c906", "packages": [ { "name": "justinrainbow/json-schema", diff --git a/l10n/et_EE.js b/l10n/et_EE.js index 55cff9cd4..627dd6ae3 100644 --- a/l10n/et_EE.js +++ b/l10n/et_EE.js @@ -1,23 +1,45 @@ OC.L10N.register( "deck", { + "You have created a new board {board}" : "Sa oled koostanud uue tahvli: {board}", + "{user} has created a new board {board}" : "{user} on koostanud uue tahvli: {board}", + "You have deleted the board {board}" : "Sa oled kustutanud tahvli: {board}", + "{user} has deleted the board {board}" : "{user} on kustutanud tahvli: {board}", + "You have restored the board {board}" : "Sa oled taastanud tahvli: {board}", + "{user} has restored the board {board}" : "{user} on taastanud tahvli: {board}", + "You have shared the board {board} with {acl}" : "Sa oled jaganud {board} tahvlit: {acl}", + "{user} has shared the board {board} with {acl}" : "{user} on jaganud {board} tahvlit: {acl}", + "You have removed {acl} from the board {board}" : "Sa oled eemaldanud {acl} ligipääsu tahvlilt {board}", + "{user} has removed {acl} from the board {board}" : "{user} on eemaldanud {acl} ligipääsu tahvlilt {board}", + "You have renamed the board {before} to {board}" : "Sa oled muutnud tahvli nime: {before} → {board}", + "{user} has renamed the board {before} to {board}" : "{user} on muutnud tahvli nime: {before} → {board}", + "You have archived the board {board}" : "Sa oled {board} tahvli arhiveerinud", + "{user} has archived the board {before}" : "{user} on {before} tahvli arhiveerinud", "Deck" : "Deck", "The file was uploaded" : "Fail laaditi üles", "The uploaded file exceeds the upload_max_filesize directive in php.ini" : "Üleslaetud fail on suurem, kui php.ini failis määratud upload_max_filesize", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Üleslaetud fail on suurem, kui MAX_FILE_SIZE atribuut, mis seadistati HTML vormis", "The file was only partially uploaded" : "Fail laaditi üles ainult osaliselt", - "No file was uploaded" : "Ühtegi faili ei latud üles", - "Missing a temporary folder" : "Ajutine kausta on puudu", - "Could not write file to disk" : "Faili kirjutamine kettale ebaõnnestus", + "No file was uploaded" : "Ühtegi faili ei laaditud üles", + "Missing a temporary folder" : "Ajutine kaust on puudu", + "Could not write file to disk" : "Faili kirjutamine kettale ei õnnestunud", "A PHP extension stopped the file upload" : "PHP laiendus peatas faili üleslaadimise", "No file uploaded or file size exceeds maximum of %s" : "Faili ei laaditud üles või selle suurus ületab maksimaalse %s", "Invalid file type. Only JSON files are allowed." : "Vigane failitüüp. Vaid JSON-failid on lubatud.", "Invalid JSON data" : "Vigased JSON-i andmed", "Failed to import board" : "Tahvli importimine ei õnnestunud", + "Cards due today" : "Kaardid, mille tähtaeg on täna", + "Cards due tomorrow" : "Kaardid, mille tähtaeg on homme", "Load more" : "Laadi veel", "Deck board" : "Kanbani tahvel", + "Owned by %1$s" : "Omanik: %1$s", + "Create a new deck card" : "Koosta uus kanbani kaart", + "Card comments" : "Kaardi kommentaarid", "%s on %s" : "%s %s-l", + "Deck boards and cards" : "Kanbani tahvlid ja kaardid", + "No data was provided to create an attachment." : "Polnud andmeid, millest luua manust.", "Finished" : "Lõpetatud", + "To review" : "Ülevaatamiseks", "Later" : "Hiljem", "copy" : "koopia", "To Do" : "Tegemiseks", @@ -25,9 +47,21 @@ OC.L10N.register( "Done" : "Valmis", "Create your first card!" : "Koosta oma esimene kaart!", "Invalid date, date format must be YYYY-MM-DD" : "Vigane kuupäev, formaat peab olema YYYY-MM-DD", + "Add board" : "Lisa tahvel", + "Card details" : "Kaardi üksikasjad", + "Search by board title" : "Otsi tahvli pealkirja alusel", + "Select board" : "Vali tahvel", "Move/copy card" : "Teisalda või kopeeri kaart", + "Select a board" : "Vali tahvel", + "No lists available" : "Loendeid pole saadaval", + "Select a list" : "Vali loend", + "Move card" : "Teisalda kaart", "Copy card" : "Kopeeri kaart", - "Cancel" : "Loobu", + "Select the card to link to a project" : "Vali kaart, mida projektis viidata", + "Link to card" : "Lisa link kaardile", + "Select a card" : "Vali kaart", + "Cancel" : "Katkesta", + "This board is read only" : "See tahvle on vaid loetav", "Drop your files to upload" : "Üleslaadimiseks lohista failid siia", "File already exists" : "Fail on juba olemas", "Add list" : "Lisa loend", diff --git a/l10n/et_EE.json b/l10n/et_EE.json index d524d79cd..c80eedf0e 100644 --- a/l10n/et_EE.json +++ b/l10n/et_EE.json @@ -1,21 +1,43 @@ { "translations": { + "You have created a new board {board}" : "Sa oled koostanud uue tahvli: {board}", + "{user} has created a new board {board}" : "{user} on koostanud uue tahvli: {board}", + "You have deleted the board {board}" : "Sa oled kustutanud tahvli: {board}", + "{user} has deleted the board {board}" : "{user} on kustutanud tahvli: {board}", + "You have restored the board {board}" : "Sa oled taastanud tahvli: {board}", + "{user} has restored the board {board}" : "{user} on taastanud tahvli: {board}", + "You have shared the board {board} with {acl}" : "Sa oled jaganud {board} tahvlit: {acl}", + "{user} has shared the board {board} with {acl}" : "{user} on jaganud {board} tahvlit: {acl}", + "You have removed {acl} from the board {board}" : "Sa oled eemaldanud {acl} ligipääsu tahvlilt {board}", + "{user} has removed {acl} from the board {board}" : "{user} on eemaldanud {acl} ligipääsu tahvlilt {board}", + "You have renamed the board {before} to {board}" : "Sa oled muutnud tahvli nime: {before} → {board}", + "{user} has renamed the board {before} to {board}" : "{user} on muutnud tahvli nime: {before} → {board}", + "You have archived the board {board}" : "Sa oled {board} tahvli arhiveerinud", + "{user} has archived the board {before}" : "{user} on {before} tahvli arhiveerinud", "Deck" : "Deck", "The file was uploaded" : "Fail laaditi üles", "The uploaded file exceeds the upload_max_filesize directive in php.ini" : "Üleslaetud fail on suurem, kui php.ini failis määratud upload_max_filesize", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Üleslaetud fail on suurem, kui MAX_FILE_SIZE atribuut, mis seadistati HTML vormis", "The file was only partially uploaded" : "Fail laaditi üles ainult osaliselt", - "No file was uploaded" : "Ühtegi faili ei latud üles", - "Missing a temporary folder" : "Ajutine kausta on puudu", - "Could not write file to disk" : "Faili kirjutamine kettale ebaõnnestus", + "No file was uploaded" : "Ühtegi faili ei laaditud üles", + "Missing a temporary folder" : "Ajutine kaust on puudu", + "Could not write file to disk" : "Faili kirjutamine kettale ei õnnestunud", "A PHP extension stopped the file upload" : "PHP laiendus peatas faili üleslaadimise", "No file uploaded or file size exceeds maximum of %s" : "Faili ei laaditud üles või selle suurus ületab maksimaalse %s", "Invalid file type. Only JSON files are allowed." : "Vigane failitüüp. Vaid JSON-failid on lubatud.", "Invalid JSON data" : "Vigased JSON-i andmed", "Failed to import board" : "Tahvli importimine ei õnnestunud", + "Cards due today" : "Kaardid, mille tähtaeg on täna", + "Cards due tomorrow" : "Kaardid, mille tähtaeg on homme", "Load more" : "Laadi veel", "Deck board" : "Kanbani tahvel", + "Owned by %1$s" : "Omanik: %1$s", + "Create a new deck card" : "Koosta uus kanbani kaart", + "Card comments" : "Kaardi kommentaarid", "%s on %s" : "%s %s-l", + "Deck boards and cards" : "Kanbani tahvlid ja kaardid", + "No data was provided to create an attachment." : "Polnud andmeid, millest luua manust.", "Finished" : "Lõpetatud", + "To review" : "Ülevaatamiseks", "Later" : "Hiljem", "copy" : "koopia", "To Do" : "Tegemiseks", @@ -23,9 +45,21 @@ "Done" : "Valmis", "Create your first card!" : "Koosta oma esimene kaart!", "Invalid date, date format must be YYYY-MM-DD" : "Vigane kuupäev, formaat peab olema YYYY-MM-DD", + "Add board" : "Lisa tahvel", + "Card details" : "Kaardi üksikasjad", + "Search by board title" : "Otsi tahvli pealkirja alusel", + "Select board" : "Vali tahvel", "Move/copy card" : "Teisalda või kopeeri kaart", + "Select a board" : "Vali tahvel", + "No lists available" : "Loendeid pole saadaval", + "Select a list" : "Vali loend", + "Move card" : "Teisalda kaart", "Copy card" : "Kopeeri kaart", - "Cancel" : "Loobu", + "Select the card to link to a project" : "Vali kaart, mida projektis viidata", + "Link to card" : "Lisa link kaardile", + "Select a card" : "Vali kaart", + "Cancel" : "Katkesta", + "This board is read only" : "See tahvle on vaid loetav", "Drop your files to upload" : "Üleslaadimiseks lohista failid siia", "File already exists" : "Fail on juba olemas", "Add list" : "Lisa loend", diff --git a/l10n/pt_PT.js b/l10n/pt_PT.js index b63d741b7..91436b0d1 100644 --- a/l10n/pt_PT.js +++ b/l10n/pt_PT.js @@ -160,8 +160,11 @@ OC.L10N.register( "Export" : "Exportar", "Today" : "Hoje", "Tomorrow" : "Amanhã", + "No results found" : "No results found", + "Due on {date}" : "Due on {date}", "Create card" : "Criar cartão", "Close" : "Fechar", + "Failed to upload {name}" : "Failed to upload {name}", "Due date" : "Data limite", "Share" : "Partilhar", "Personal" : "Pessoal", diff --git a/l10n/pt_PT.json b/l10n/pt_PT.json index fc3ab567b..6a94ef12b 100644 --- a/l10n/pt_PT.json +++ b/l10n/pt_PT.json @@ -158,8 +158,11 @@ "Export" : "Exportar", "Today" : "Hoje", "Tomorrow" : "Amanhã", + "No results found" : "No results found", + "Due on {date}" : "Due on {date}", "Create card" : "Criar cartão", "Close" : "Fechar", + "Failed to upload {name}" : "Failed to upload {name}", "Due date" : "Data limite", "Share" : "Partilhar", "Personal" : "Pessoal", diff --git a/lib/Command/CalendarToggle.php b/lib/Command/CalendarToggle.php new file mode 100644 index 000000000..2381cff94 --- /dev/null +++ b/lib/Command/CalendarToggle.php @@ -0,0 +1,67 @@ +userManager = $userManager; + $this->config = $config; + } + + protected function configure() { + $this + ->setName('deck:calendar-toggle') + ->setDescription('Enable or disable Deck calendar/tasks integration for all existing users. Users can still change their own setting afterwards. Only affects users that already exist at the time of execution.') + ->addOption( + 'on', + null, + InputOption::VALUE_NONE, + 'Enable calendar/tasks integration for all existing users (users can opt-out later)' + ) + ->addOption( + 'off', + null, + InputOption::VALUE_NONE, + 'Disable calendar/tasks integration for all existing users (users can opt-in later)' + ); + } + + protected function execute(InputInterface $input, OutputInterface $output): int { + $enable = $input->getOption('on'); + $disable = $input->getOption('off'); + if ($enable && $disable) { + $output->writeln('Cannot use --on and --off together.'); + return 1; + } + if (!$enable && !$disable) { + $output->writeln('Please specify either --on or --off.'); + return 1; + } + $value = $enable ? 'yes' : ''; + $users = $this->userManager->search(''); + $count = 0; + foreach ($users as $user) { + $uid = $user->getUID(); + $this->config->setUserValue($uid, 'deck', 'calendar', $value); + $output->writeln("Set calendar integration to '" . ($enable ? 'on' : 'off') . "' for user: $uid"); + $count++; + } + $output->writeln("Done. Updated $count existing users."); + return 0; + } +}