Merge branch 'master' of https://github.com/appwrite/appwrite into 0.11.x
This commit is contained in:
commit
b3dd0133a1
|
@ -395,7 +395,7 @@ Pull requests are great, but there are many other areas where you can help Appwr
|
||||||
|
|
||||||
### Blogging & Speaking
|
### 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
|
### Presenting at Meetups
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ input, textarea {
|
||||||
|
|
||||||
input[type=file],
|
input[type=file],
|
||||||
input[type=file]::-webkit-file-upload-button {
|
input[type=file]::-webkit-file-upload-button {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
button,
|
button,
|
||||||
|
@ -412,6 +412,7 @@ fieldset {
|
||||||
width: ~"calc(100% - 2px)";
|
width: ~"calc(100% - 2px)";
|
||||||
max-height: 180px;
|
max-height: 180px;
|
||||||
visibility: visible !important;
|
visibility: visible !important;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-preview {
|
.video-preview {
|
||||||
|
@ -591,7 +592,7 @@ input[type=checkbox], input[type=radio] {
|
||||||
color: var(--config-color-background-fade);
|
color: var(--config-color-background-fade);
|
||||||
background: var(--config-color-focus);
|
background: var(--config-color-focus);
|
||||||
}
|
}
|
||||||
|
|
||||||
&[type=radio] {
|
&[type=radio] {
|
||||||
&:checked:after {
|
&:checked:after {
|
||||||
//content: '●';
|
//content: '●';
|
||||||
|
@ -650,7 +651,7 @@ input[type=checkbox], input[type=radio] {
|
||||||
color: var(--config-color-fade);
|
color: var(--config-color-fade);
|
||||||
padding: 5px 15px;
|
padding: 5px 15px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|
||||||
form {
|
form {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
@ -817,7 +818,7 @@ label.switch {
|
||||||
&:focus,
|
&:focus,
|
||||||
&:hover {
|
&:hover {
|
||||||
background: var(--config-color-success);
|
background: var(--config-color-success);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:focus,
|
&:focus,
|
||||||
|
@ -929,7 +930,7 @@ hr {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background: var(--config-border-color)!important;
|
background: var(--config-border-color)!important;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
&.fade {
|
&.fade {
|
||||||
opacity: .7;
|
opacity: .7;
|
||||||
}
|
}
|
||||||
|
@ -1299,7 +1300,7 @@ ol {
|
||||||
height: 26px;
|
height: 26px;
|
||||||
width: 44px;
|
width: 44px;
|
||||||
margin: 9px 0;
|
margin: 9px 0;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -1322,7 +1323,7 @@ ol {
|
||||||
&.force-light {
|
&.force-light {
|
||||||
.pull-end;
|
.pull-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.force-dark {
|
&.force-dark {
|
||||||
.pull-start;
|
.pull-start;
|
||||||
}
|
}
|
||||||
|
@ -1354,4 +1355,4 @@ ol {
|
||||||
&.info {
|
&.info {
|
||||||
background: var(--config-color-info)!important;
|
background: var(--config-color-info)!important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ abstract class Migration
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Migration constructor.
|
* Migration constructor.
|
||||||
*
|
*
|
||||||
* @param PDO $pdo
|
* @param PDO $pdo
|
||||||
*/
|
*/
|
||||||
public function __construct(PDO $db)
|
public function __construct(PDO $db)
|
||||||
|
@ -63,11 +63,11 @@ abstract class Migration
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set project for migration.
|
* Set project for migration.
|
||||||
*
|
*
|
||||||
* @param Document $project
|
* @param Document $project
|
||||||
* @param Database $projectDB
|
* @param Database $projectDB
|
||||||
*
|
*
|
||||||
* @return Migration
|
* @return Migration
|
||||||
*/
|
*/
|
||||||
public function setProject(Document $project, Database $projectDB): Migration
|
public function setProject(Document $project, Database $projectDB): Migration
|
||||||
{
|
{
|
||||||
|
@ -79,7 +79,7 @@ abstract class Migration
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Iterates through every document.
|
* Iterates through every document.
|
||||||
*
|
*
|
||||||
* @param callable $callback
|
* @param callable $callback
|
||||||
*/
|
*/
|
||||||
public function forEachDocument(callable $callback): void
|
public function forEachDocument(callable $callback): void
|
||||||
|
@ -99,7 +99,6 @@ abstract class Migration
|
||||||
|
|
||||||
Console::log('Migrating: ' . $offset . ' / ' . $this->projectDB->getSum());
|
Console::log('Migrating: ' . $offset . ' / ' . $this->projectDB->getSum());
|
||||||
\Co\run(function () use ($all, $callback) {
|
\Co\run(function () use ($all, $callback) {
|
||||||
|
|
||||||
foreach ($all as $document) {
|
foreach ($all as $document) {
|
||||||
go(function () use ($document, $callback) {
|
go(function () use ($document, $callback) {
|
||||||
if (empty($document->getId()) || empty($document->getCollection())) {
|
if (empty($document->getId()) || empty($document->getCollection())) {
|
||||||
|
@ -134,24 +133,23 @@ abstract class Migration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function check_diff_multi($array1, $array2){
|
public function check_diff_multi($array1, $array2)
|
||||||
|
{
|
||||||
$result = array();
|
$result = array();
|
||||||
|
|
||||||
foreach($array1 as $key => $val) {
|
foreach ($array1 as $key => $val) {
|
||||||
if(is_array($val) && isset($array2[$key])) {
|
if (is_array($val) && isset($array2[$key])) {
|
||||||
$tmp = $this->check_diff_multi($val, $array2[$key]);
|
$tmp = $this->check_diff_multi($val, $array2[$key]);
|
||||||
if($tmp) {
|
if ($tmp) {
|
||||||
$result[$key] = $tmp;
|
$result[$key] = $tmp;
|
||||||
}
|
}
|
||||||
}
|
} elseif (!isset($array2[$key])) {
|
||||||
elseif(!isset($array2[$key])) {
|
|
||||||
$result[$key] = null;
|
$result[$key] = null;
|
||||||
}
|
} elseif ($val !== $array2[$key]) {
|
||||||
elseif($val !== $array2[$key]) {
|
|
||||||
$result[$key] = $array2[$key];
|
$result[$key] = $array2[$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($array2[$key])) {
|
if (isset($array2[$key])) {
|
||||||
unset($array2[$key]);
|
unset($array2[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace Appwrite\Migration\Version;
|
namespace Appwrite\Migration\Version;
|
||||||
|
|
||||||
|
|
||||||
use Utopia\App;
|
use Utopia\App;
|
||||||
use Utopia\CLI\Console;
|
use Utopia\CLI\Console;
|
||||||
use Appwrite\Database\Database;
|
use Appwrite\Database\Database;
|
||||||
|
@ -35,8 +34,7 @@ class V06 extends Migration
|
||||||
case Database::SYSTEM_COLLECTION_KEYS:
|
case Database::SYSTEM_COLLECTION_KEYS:
|
||||||
if ($document->getAttribute('secret', null)) {
|
if ($document->getAttribute('secret', null)) {
|
||||||
$json = \json_decode($document->getAttribute('secret'), true);
|
$json = \json_decode($document->getAttribute('secret'), true);
|
||||||
if (is_array($json))
|
if (is_array($json)) {
|
||||||
{
|
|
||||||
Console::log('Secret already encrypted. Skipped: ' . $document->getId());
|
Console::log('Secret already encrypted. Skipped: ' . $document->getId());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue