mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Some code cleanups
This commit is contained in:
1 parent
968cc58ee6
commit
823a4ea3bd
4 files changed
+27
-73
No files matched your search
@@ -217,20 +217,6 @@ $utopia->get('/v1/storage/files/:fileId/preview')
|
||||
if (!file_exists($path)) {
|
||||
throw new Exception('File not found in ' . $path, 404);
|
||||
}
|
||||
/*
|
||||
if(1 === 1 || !$libreOffice->supported($convertExt)) {
|
||||
if (array_key_exists($mimeType, $fileLogos)) {
|
||||
$path = realpath('./images/file-types/' . $fileLogos[$mimeType]);
|
||||
$type = 'jpg';
|
||||
$cipher = '';
|
||||
$algorithm = '';
|
||||
} elseif (!in_array($mimeType, $inputs)) {
|
||||
$path = realpath('./images/file-types/default.gif');
|
||||
$type = 'jpg';
|
||||
$cipher = '';
|
||||
$algorithm = '';
|
||||
}
|
||||
}*/
|
||||
|
||||
$cache = new Cache(new Filesystem('/storage/cache/app-' . $project->getUid())); // Limit file number or size
|
||||
$data = $cache->load($key, 60 * 60 * 24 * 30 * 3 /* 3 months */);
|
||||
@@ -620,24 +606,4 @@ $utopia->get('/v1/storage/files/:fileId/scan')
|
||||
|
||||
//$response->json($antiVirus->continueScan($device->getRoot()));
|
||||
}
|
||||
);
|
||||
/*
|
||||
$utopia->get('/v1/storage/scan')
|
||||
->desc('Scan Storage')
|
||||
->label('scope', 'storage.scan')
|
||||
->label('sdk.namespace', 'storage')
|
||||
->label('sdk.method', 'scan')
|
||||
->label('sdk.hide', true)
|
||||
->action(
|
||||
function() use ($response)
|
||||
{
|
||||
$device = Storage::getDevice('local');
|
||||
|
||||
$antiVirus = new Network('clamav', 3310);
|
||||
//var_dump($antiVirus->ping());
|
||||
//var_dump($antiVirus->version());
|
||||
//var_dump($antiVirus->fileScan('/storage/uploads/app-1/5/9/f/e/59fecaed49645.pdf'));
|
||||
|
||||
$response->json($antiVirus->continueScan($device->getRoot()));
|
||||
}
|
||||
);*/
|
||||
);
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.pull-start{float:left}.pull-end{float:right}img[src=""]{visibility:hidden;display:inline-block}.margin-end{margin-right:20px!important}.margin-start{margin-left:20px!important}.margin-end-small{margin-right:10px!important}.margin-start-small{margin-left:10px!important}.margin-end-large{margin-right:50px!important}.margin-start-large{margin-left:50px!important}.margin-end-no{margin-right:0!important}.margin-start-no{margin-left:0!important}.margin-top{margin-top:30px!important}.margin-bottom{margin-bottom:30px!important}.margin-top-no{margin-top:0!important}.margin-bottom-no{margin-bottom:0!important}.margin-top-xxl{margin-top:140px!important}.margin-top-xl{margin-top:80px!important}.margin-top-large{margin-top:50px!important}.margin-top-small{margin-top:15px!important}.margin-top-tiny{margin-top:5px!important}.margin-top-negative{margin-top:-30px!important}.margin-top-negative-tiny{margin-top:-5px!important}.margin-top-negative-small{margin-top:-15px!important}.margin-top-negative-large{margin-top:-50px!important}.margin-top-negative-xl{margin-top:-80px!important}.margin-top-negative-xxl{margin-top:-100px!important}.margin-bottom-xxl{margin-bottom:140px!important}.margin-bottom-xl{margin-bottom:80px!important}.margin-bottom-large{margin-bottom:50px!important}.margin-bottom-small{margin-bottom:15px!important}.margin-bottom-tiny{margin-bottom:5px!important}.margin-bottom-negative{margin-bottom:-30px!important}.margin-bottom-negative-tiny{margin-bottom:-5px!important}.margin-bottom-negative-small{margin-bottom:-15px!important}.margin-bottom-negative-large{margin-bottom:-50px!important}.margin-bottom-negative-xl{margin-bottom:-80px!important}.margin-bottom-negative-xl{margin-bottom:-100px!important}.ratio-wide{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-wide>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-square{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-square>*{position:absolute;top:0;left:0;width:100%;height:100%}.clear:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}*{font-family:Poppins,sans-serif,Arial;-webkit-font-smoothing:antialiased;font-weight:300}h1,h2,h3,h4,h5,h6{margin:0}h4,h5,h6{font-weight:400}.link,a{color:#1e849e;text-decoration:none;border-left:2px solid transparent;border-right:2px solid transparent;border-bottom:solid 1px transparent}.link:hover,a:hover{border-bottom:dotted 1px #1e849e}.link.disabled,a.disabled{opacity:.5}.link.disabled:hover,a.disabled:hover{border-bottom:none}.link.tag:hover,a.tag:hover{border-bottom:none;opacity:.9}b,strong{font-weight:500}p{margin:0 0 20px 0;line-height:30px}p.note{color:#6f6f6f}.note,small{color:#797979}.text-size-small{font-size:13px}.text-size-normal{font-size:16px}.text-one-liner{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-center{text-align:center}.text-bold{font-weight:400!important}.text-danger{color:#f53d3d}.text-success{color:#1bbf61}.text-upper{text-transform:uppercase}.text-warning{color:#ffed4d}.text-focus{color:#f02e65}.text-fade{color:#9e9e9e}.text-disclaimer{font-size:11px;color:#9e9e9e}.text-fade-extra{color:#9e9e9e;opacity:.5}.text-line-high-large{line-height:30px}.text-line-high-xl{line-height:40px}.text-sign{margin:5px 0;font-size:25px;width:25px;height:25px;line-height:25px;display:inline-block}.text-align-start{text-align:left}.text-align-end{text-align:right}.text-align-left{text-align:left}.text-align-right{text-align:right}.text-dir-ltr{direction:ltr;display:inline-block}.text-dir-rtl{direction:rtl;display:inline-block}.icon-dot-3:before{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}table{width:calc(100% + 60px);font-size:14px;border-collapse:collapse;margin:-30px;border-radius:10px;overflow:hidden;position:relative;table-layout:fixed}table thead{box-shadow:0 0 2px rgba(0,0,0,.25);border-bottom:solid 1px #e7e7e7}table thead th{position:sticky;top:0}table.small{font-size:12px}table.open-end tbody tr:last-child{border-bottom:none;font-weight:700;background:#f7fbf7}table.full tbody td,table.full tbody th{vertical-align:top;white-space:normal;overflow:auto;line-height:24px;padding-top:20px;padding-bottom:20px;height:auto}table .avatar{width:30px;height:30px}table tr{border-bottom:solid 1px #e7e7e7}table tr:last-child{border-bottom:none}table tr:nth-child(even){background:#fbfbfb}table th{text-align:left;font-weight:400}table th i{color:#9e9e9e;font-size:10px;display:inline-block;vertical-align:top;line-height:16px;padding:0 3px}table td,table th{height:65px;padding:0 15px;line-height:50px}table td:first-child,table th:first-child{padding-left:30px}table td:last-child,table th:last-child{padding-right:30px}@media only screen and (max-width:550px){table td:first-child,table th:first-child{width:auto}}table td,table th{overflow:hidden;white-space:nowrap}@media only screen and (max-width:550px),only screen and Line truncated
|
||||
.pull-start{float:left}.pull-end{float:right}img[src=""]{visibility:hidden;display:inline-block}.margin-end{margin-right:20px!important}.margin-start{margin-left:20px!important}.margin-end-small{margin-right:10px!important}.margin-start-small{margin-left:10px!important}.margin-end-large{margin-right:50px!important}.margin-start-large{margin-left:50px!important}.margin-end-no{margin-right:0!important}.margin-start-no{margin-left:0!important}.margin-top{margin-top:30px!important}.margin-bottom{margin-bottom:30px!important}.margin-top-no{margin-top:0!important}.margin-bottom-no{margin-bottom:0!important}.margin-top-xxl{margin-top:140px!important}.margin-top-xl{margin-top:80px!important}.margin-top-large{margin-top:50px!important}.margin-top-small{margin-top:15px!important}.margin-top-tiny{margin-top:5px!important}.margin-top-negative{margin-top:-30px!important}.margin-top-negative-tiny{margin-top:-5px!important}.margin-top-negative-small{margin-top:-15px!important}.margin-top-negative-large{margin-top:-50px!important}.margin-top-negative-xl{margin-top:-80px!important}.margin-top-negative-xxl{margin-top:-100px!important}.margin-bottom-xxl{margin-bottom:140px!important}.margin-bottom-xl{margin-bottom:80px!important}.margin-bottom-large{margin-bottom:50px!important}.margin-bottom-small{margin-bottom:15px!important}.margin-bottom-tiny{margin-bottom:5px!important}.margin-bottom-negative{margin-bottom:-30px!important}.margin-bottom-negative-tiny{margin-bottom:-5px!important}.margin-bottom-negative-small{margin-bottom:-15px!important}.margin-bottom-negative-large{margin-bottom:-50px!important}.margin-bottom-negative-xl{margin-bottom:-80px!important}.margin-bottom-negative-xl{margin-bottom:-100px!important}.ratio-wide{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-wide>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-square{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-square>*{position:absolute;top:0;left:0;width:100%;height:100%}.clear:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}*{font-family:Poppins,sans-serif,Arial;-webkit-font-smoothing:antialiased;font-weight:300}h1,h2,h3,h4,h5,h6{margin:0}h4,h5,h6{font-weight:400}.link,a{color:#1e849e;text-decoration:none;border-left:2px solid transparent;border-right:2px solid transparent;border-bottom:solid 1px transparent}.link:hover,a:hover{border-bottom:dotted 1px #1e849e}.link.disabled,a.disabled{opacity:.5}.link.disabled:hover,a.disabled:hover{border-bottom:none}.link.tag:hover,a.tag:hover{border-bottom:none;opacity:.9}b,strong{font-weight:500}p{margin:0 0 20px 0;line-height:30px}p.note{color:#6f6f6f}.note,small{color:#797979}.text-size-small{font-size:13px}.text-size-normal{font-size:16px}.text-one-liner{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-center{text-align:center}.text-bold{font-weight:400!important}.text-danger{color:#f53d3d}.text-success{color:#1bbf61}.text-upper{text-transform:uppercase}.text-warning{color:#ffed4d}.text-focus{color:#f02e65}.text-fade{color:#9e9e9e}.text-disclaimer{font-size:11px;color:#9e9e9e}.text-fade-extra{color:#9e9e9e;opacity:.5}.text-line-high-large{line-height:30px}.text-line-high-xl{line-height:40px}.text-sign{margin:5px 0;font-size:25px;width:25px;height:25px;line-height:25px;display:inline-block}.text-align-start{text-align:left}.text-align-end{text-align:right}.text-align-left{text-align:left}.text-align-right{text-align:right}.text-dir-ltr{direction:ltr;display:inline-block}.text-dir-rtl{direction:rtl;display:inline-block}.icon-dot-3:before{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}table{width:calc(100% + 60px);font-size:14px;border-collapse:collapse;margin:-30px;border-radius:10px;overflow:hidden;position:relative;table-layout:fixed}table thead{box-shadow:0 0 2px rgba(0,0,0,.25);border-bottom:solid 1px #e7e7e7}table thead th{position:sticky;top:0}table.small{font-size:12px}table.open-end tbody tr:last-child{border-bottom:none;font-weight:700;background:#f7fbf7}table.full tbody td,table.full tbody th{vertical-align:top;white-space:normal;overflow:auto;line-height:24px;padding-top:20px;padding-bottom:20px;height:auto}table .avatar{width:30px;height:30px}table tr{border-bottom:solid 1px #e7e7e7}table tr:last-child{border-bottom:none}table tr:nth-child(even){background:#fbfbfb}table th{text-align:left;font-weight:400}table th i{color:#9e9e9e;font-size:10px;display:inline-block;vertical-align:top;line-height:16px;padding:0 3px}table td,table th{height:65px;padding:0 15px;line-height:50px}table td:first-child,table th:first-child{padding-left:30px}table td:last-child,table th:last-child{padding-right:30px}@media only screen and (max-width:550px){table td:first-child,table th:first-child{width:auto}}table td,table th{overflow:hidden;white-space:nowrap}@media only screen and (max-width:550px),only screen and Line truncated
|
||||
@@ -448,6 +448,9 @@ fieldset {
|
||||
border: none;
|
||||
height: auto;
|
||||
width: auto;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
&:hover {
|
||||
border: none;
|
||||
|
||||
+22
-37
@@ -60,24 +60,24 @@ class Database
|
||||
'legalCity' => '',
|
||||
'legalAddress' => '',
|
||||
'legalTaxId' => '',
|
||||
'usersOauthBitbucketAppid' => '',
|
||||
'usersOauthBitbucketSecret' => '',
|
||||
// 'usersOauthBitbucketAppid' => '',
|
||||
// 'usersOauthBitbucketSecret' => '',
|
||||
'usersOauthFacebookAppid' => '',
|
||||
'usersOauthFacebookSecret' => '',
|
||||
'usersOauthGithubAppid' => '',
|
||||
'usersOauthGithubSecret' => '',
|
||||
'usersOauthGitlabAppid' => '',
|
||||
'usersOauthGitlabSecret' => '',
|
||||
'usersOauthGoogleAppid' => '',
|
||||
'usersOauthGoogleSecret' => '',
|
||||
'usersOauthInstagramAppid' => '',
|
||||
'usersOauthInstagramSecret' => '',
|
||||
// 'usersOauthGitlabAppid' => '',
|
||||
// 'usersOauthGitlabSecret' => '',
|
||||
// 'usersOauthGoogleAppid' => '',
|
||||
// 'usersOauthGoogleSecret' => '',
|
||||
// 'usersOauthInstagramAppid' => '',
|
||||
// 'usersOauthInstagramSecret' => '',
|
||||
'usersOauthLinkedinAppid' => '',
|
||||
'usersOauthLinkedinSecret' => '',
|
||||
'usersOauthMicrosoftAppid' => '',
|
||||
'usersOauthMicrosoftSecret' => '',
|
||||
'usersOauthTwitterAppid' => '',
|
||||
'usersOauthTwitterSecret' => '',
|
||||
// 'usersOauthMicrosoftAppid' => '',
|
||||
// 'usersOauthMicrosoftSecret' => '',
|
||||
// 'usersOauthTwitterAppid' => '',
|
||||
// 'usersOauthTwitterSecret' => '',
|
||||
],
|
||||
self::SYSTEM_COLLECTION_COLLECTIONS => [
|
||||
'$collection' => self::SYSTEM_COLLECTION_COLLECTIONS,
|
||||
@@ -94,7 +94,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -104,7 +103,6 @@ class Database
|
||||
'default' => false,
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -136,7 +134,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -146,7 +143,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -156,7 +152,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -166,7 +161,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => false,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -176,7 +170,6 @@ class Database
|
||||
'default' => true,
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -186,7 +179,6 @@ class Database
|
||||
'default' => true,
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -218,7 +210,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => false,
|
||||
'array' => true,
|
||||
|
||||
],
|
||||
],
|
||||
],
|
||||
@@ -237,7 +228,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -247,7 +237,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -257,7 +246,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -267,7 +255,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -277,7 +264,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -287,7 +273,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => false,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -297,7 +282,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -307,7 +291,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -523,7 +506,6 @@ class Database
|
||||
'default' => null,
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -533,7 +515,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -543,7 +524,6 @@ class Database
|
||||
'default' => 0,
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -553,7 +533,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -563,7 +542,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
],
|
||||
],
|
||||
@@ -654,7 +632,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -664,7 +641,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => false,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
[
|
||||
'$collection' => self::SYSTEM_COLLECTION_RULES,
|
||||
@@ -674,7 +650,6 @@ class Database
|
||||
'default' => '',
|
||||
'required' => false,
|
||||
'array' => false,
|
||||
|
||||
],
|
||||
],
|
||||
],
|
||||
@@ -1707,6 +1682,16 @@ class Database
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @param string $value
|
||||
* @return array
|
||||
*/
|
||||
public function setMock($key, $value) {
|
||||
$this->mocks[$key] = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user