From db7e1f5ebb693b152e37e40a69be4f8daa2e4a87 Mon Sep 17 00:00:00 2001 From: waridrox Date: Wed, 6 Oct 2021 13:23:33 +0530 Subject: [PATCH 1/7] Fixed PSR issues in Migration library Signed-off-by: waridrox --- src/Appwrite/Migration/Migration.php | 28 ++++++++++++-------------- src/Appwrite/Migration/Version/V06.php | 4 +--- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 2ab1ce4fd3..aed2da3acb 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -52,7 +52,7 @@ abstract class Migration /** * Migration constructor. - * + * * @param PDO $pdo */ public function __construct(PDO $db) @@ -62,11 +62,11 @@ abstract class Migration /** * Set project for migration. - * + * * @param Document $project * @param Database $projectDB - * - * @return Migration + * + * @return Migration */ public function setProject(Document $project, Database $projectDB): Migration { @@ -78,7 +78,7 @@ abstract class Migration /** * Iterates through every document. - * + * * @param callable $callback */ public function forEachDocument(callable $callback): void @@ -98,7 +98,6 @@ abstract class Migration Console::log('Migrating: ' . $offset . ' / ' . $this->projectDB->getSum()); \Co\run(function () use ($all, $callback) { - foreach ($all as $document) { go(function () use ($document, $callback) { if (empty($document->getId()) || empty($document->getCollection())) { @@ -131,24 +130,23 @@ abstract class Migration } } - public function check_diff_multi($array1, $array2){ + public function check_diff_multi($array1, $array2) + { $result = array(); - foreach($array1 as $key => $val) { - if(is_array($val) && isset($array2[$key])) { + foreach ($array1 as $key => $val) { + if (is_array($val) && isset($array2[$key])) { $tmp = $this->check_diff_multi($val, $array2[$key]); - if($tmp) { + if ($tmp) { $result[$key] = $tmp; } - } - elseif(!isset($array2[$key])) { + } elseif (!isset($array2[$key])) { $result[$key] = null; - } - elseif($val !== $array2[$key]) { + } elseif ($val !== $array2[$key]) { $result[$key] = $array2[$key]; } - if(isset($array2[$key])) { + if (isset($array2[$key])) { unset($array2[$key]); } } diff --git a/src/Appwrite/Migration/Version/V06.php b/src/Appwrite/Migration/Version/V06.php index e4fbc77718..b28ce8ac2f 100644 --- a/src/Appwrite/Migration/Version/V06.php +++ b/src/Appwrite/Migration/Version/V06.php @@ -2,7 +2,6 @@ namespace Appwrite\Migration\Version; - use Utopia\App; use Utopia\CLI\Console; use Appwrite\Database\Database; @@ -35,8 +34,7 @@ class V06 extends Migration case Database::SYSTEM_COLLECTION_KEYS: if ($document->getAttribute('secret', null)) { $json = \json_decode($document->getAttribute('secret'), true); - if (is_array($json)) - { + if (is_array($json)) { Console::log('Secret already encrypted. Skipped: ' . $document->getId()); break; } From e94130dd27bbe4bd0374537612c6948d97760189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MishManners=C2=AE=E2=84=A2?= <36594527+mishmanners@users.noreply.github.com> Date: Thu, 14 Oct 2021 12:33:14 +1100 Subject: [PATCH 2/7] Email add MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated email to include the full email path, as well as direct link that will open in the users' default mail software. This makes it easier/quicker to contact you šŸ˜„ --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 945229c51c..01aa3d2ede 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -395,7 +395,7 @@ Pull requests are great, but there are many other areas where you can help Appwr ### Blogging & Speaking -Blogging, speaking about, or creating tutorials about one of Appwrite’s many features. Mention [@appwrite_io](https://twitter.com/appwrite_io) on Twitter and/or email team [at] appwrite [dot] io so we can give pointers and tips and help you spread the word by promoting your content on the different Appwrite communication channels. Please add your blog posts and videos of talks to our [Awesome Appwrite](https://github.com/appwrite/awesome-appwrite) repo on GitHub. +Blogging, speaking about, or creating tutorials about one of Appwrite’s many features. Mention [@appwrite_io](https://twitter.com/appwrite_io) on Twitter and/or [email team@appwrite.io](mailto:team@appwrite.io) so we can give pointers and tips and help you spread the word by promoting your content on the different Appwrite communication channels. Please add your blog posts and videos of talks to our [Awesome Appwrite](https://github.com/appwrite/awesome-appwrite) repo on GitHub. ### Presenting at Meetups From 41cfe3a3a3c89a1dc9a544c00b901199aee3d07a Mon Sep 17 00:00:00 2001 From: m1ga Date: Fri, 15 Oct 2021 14:30:38 +0200 Subject: [PATCH 3/7] fix: mobile storage image preview --- public/styles/forms.less | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/public/styles/forms.less b/public/styles/forms.less index c0ea06bb76..287b5b3422 100644 --- a/public/styles/forms.less +++ b/public/styles/forms.less @@ -25,7 +25,7 @@ input, textarea { input[type=file], input[type=file]::-webkit-file-upload-button { - cursor: pointer; + cursor: pointer; } button, @@ -412,6 +412,7 @@ fieldset { width: ~"calc(100% - 2px)"; max-height: 180px; visibility: visible !important; + object-fit: contain; } .video-preview { @@ -591,7 +592,7 @@ input[type=checkbox], input[type=radio] { color: var(--config-color-background-fade); background: var(--config-color-focus); } - + &[type=radio] { &:checked:after { //content: 'ā—'; @@ -650,7 +651,7 @@ input[type=checkbox], input[type=radio] { color: var(--config-color-fade); padding: 5px 15px; font-size: 12px; - + form { display: inline-block; } @@ -817,7 +818,7 @@ label.switch { &:focus, &:hover { background: var(--config-color-success); - } + } } &:focus, @@ -929,7 +930,7 @@ hr { height: 1px; background: var(--config-border-color)!important; border: none; - + &.fade { opacity: .7; } @@ -1299,7 +1300,7 @@ ol { height: 26px; width: 44px; margin: 9px 0; - + button { padding: 3px; display: block; @@ -1322,7 +1323,7 @@ ol { &.force-light { .pull-end; } - + &.force-dark { .pull-start; } @@ -1354,4 +1355,4 @@ ol { &.info { background: var(--config-color-info)!important; } -} \ No newline at end of file +} From 84b42f830684e29a296e17eb2edad17ace3662fd Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Sat, 16 Oct 2021 14:12:07 +0200 Subject: [PATCH 4/7] ci(gh): remove tests --- .github/workflows/tests.yml | 41 ------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 9d7423af82..0000000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: "Tests" - -on: [pull_request] - -jobs: - tests: - name: Unit & E2E - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - - name: Build Appwrite - # Upstream bug causes buildkit pulls to fail so prefetch base images - # https://github.com/moby/moby/issues/41864 - run: | - echo "_APP_FUNCTIONS_RUNTIMES=php-8.0" >> .env - docker pull composer:2.0 - docker pull php:8.0-cli-alpine - docker-compose build - docker-compose up -d - sleep 10 - - - name: Doctor - run: docker-compose exec -T appwrite doctor - - - name: Environment Variables - run: docker-compose exec -T appwrite vars - - - name: Run Tests - run: docker-compose exec -T appwrite test --debug From bac55d147887aa05d5e7f94359319fd2002afbbe Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 16 Oct 2021 19:34:02 +0300 Subject: [PATCH 5/7] Added mime types --- app/config/storage/mimes.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/config/storage/mimes.php b/app/config/storage/mimes.php index 242a990b8d..bec24758c6 100644 --- a/app/config/storage/mimes.php +++ b/app/config/storage/mimes.php @@ -16,6 +16,22 @@ return [ 'video/quicktime', 'video/x-msvideo', 'video/x-ms-wmv', + + // Audio Files + + 'audio/basic', // au RFC 2046 + 'audio/basic', // snd + 'auido/L24', // Linear PCM RFC 3190 + 'audio/mid', // mid rmi + 'audio/mpeg', // mp3 RFC 3003 + 'audio/mp4', // mp4 audio + 'audio/x-aiff', // aif aifc aiff + 'audio/x-mpegurl', // m3u + 'audio/vnd.rn-realaudio', // ra + 'audio/vnd.rn-realaudio', // ram + 'audio/ogg', // Ogg Vorbis RFC 5334 + 'audio/vorbis', // Vorbis RFC 5215 + 'audio/vnd.wav', // wav RFC 2361 // Microsoft Word 'application/msword', From 0cca6dbce2eb2952b1e31d5e92648465dfc37edf Mon Sep 17 00:00:00 2001 From: "Eldad A. Fux" Date: Sun, 17 Oct 2021 12:22:19 +0300 Subject: [PATCH 6/7] Update app/config/storage/mimes.php Co-authored-by: Damodar Lohani --- app/config/storage/mimes.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/config/storage/mimes.php b/app/config/storage/mimes.php index bec24758c6..26125206b8 100644 --- a/app/config/storage/mimes.php +++ b/app/config/storage/mimes.php @@ -21,17 +21,17 @@ return [ 'audio/basic', // au RFC 2046 'audio/basic', // snd - 'auido/L24', // Linear PCM RFC 3190 + 'auido/L24', // Linear PCM RFC 3190 'audio/mid', // mid rmi - 'audio/mpeg', // mp3 RFC 3003 - 'audio/mp4', // mp4 audio - 'audio/x-aiff', // aif aifc aiff + 'audio/mpeg', // mp3 RFC 3003 + 'audio/mp4', // mp4 audio + 'audio/x-aiff', // aif aifc aiff 'audio/x-mpegurl', // m3u 'audio/vnd.rn-realaudio', // ra - 'audio/vnd.rn-realaudio', // ram - 'audio/ogg', // Ogg Vorbis RFC 5334 + 'audio/vnd.rn-realaudio', // ram + 'audio/ogg', // Ogg Vorbis RFC 5334 'audio/vorbis', // Vorbis RFC 5215 - 'audio/vnd.wav', // wav RFC 2361 + 'audio/vnd.wav', // wav RFC 2361 // Microsoft Word 'application/msword', From 1e07f0db979a3ecd928e14dcbc7965ad19d2039a Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 17 Oct 2021 12:23:42 +0300 Subject: [PATCH 7/7] Fix for review --- app/config/storage/mimes.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/config/storage/mimes.php b/app/config/storage/mimes.php index 26125206b8..7995ef368a 100644 --- a/app/config/storage/mimes.php +++ b/app/config/storage/mimes.php @@ -19,16 +19,14 @@ return [ // Audio Files - 'audio/basic', // au RFC 2046 - 'audio/basic', // snd + 'audio/basic', // au snd RFC 2046 'auido/L24', // Linear PCM RFC 3190 'audio/mid', // mid rmi 'audio/mpeg', // mp3 RFC 3003 'audio/mp4', // mp4 audio 'audio/x-aiff', // aif aifc aiff 'audio/x-mpegurl', // m3u - 'audio/vnd.rn-realaudio', // ra - 'audio/vnd.rn-realaudio', // ram + 'audio/vnd.rn-realaudio', // ra ram 'audio/ogg', // Ogg Vorbis RFC 5334 'audio/vorbis', // Vorbis RFC 5215 'audio/vnd.wav', // wav RFC 2361