mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-07 15:54:26 +02:00
Merge branch 'develop' into refactor-logger
This commit is contained in:
commit
3eab8eb3dd
5 changed files with 32 additions and 23 deletions
|
@ -60,9 +60,9 @@ HELP;
|
||||||
{
|
{
|
||||||
parent::__construct($argv);
|
parent::__construct($argv);
|
||||||
|
|
||||||
$this->appMode = $appMode;
|
$this->appMode = $appMode;
|
||||||
$this->l10n = $l10n;
|
$this->l10n = $l10n;
|
||||||
$this->dba = $dba;
|
$this->dba = $dba;
|
||||||
|
|
||||||
AddonCore::loadAddons();
|
AddonCore::loadAddons();
|
||||||
}
|
}
|
||||||
|
@ -121,27 +121,28 @@ HELP;
|
||||||
$this->out($this->getHelp());
|
$this->out($this->getHelp());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (AddonCore::getAvailableList() as $addon) {
|
foreach (AddonCore::getAvailableList() as $addon) {
|
||||||
$addon_name = $addon[0];
|
$addon_name = $addon[0];
|
||||||
$enabled = AddonCore::isEnabled($addon_name) ? "enabled" : "disabled";
|
$enabled = AddonCore::isEnabled($addon_name);
|
||||||
switch ($subCmd) {
|
|
||||||
case 'all':
|
if ($subCmd === 'all') {
|
||||||
$table->addRow([$addon_name, $enabled]);
|
$table->addRow([$addon_name, $enabled ? 'enabled' : 'disabled']);
|
||||||
break;
|
|
||||||
case 'enabled':
|
continue;
|
||||||
if (!$enabled) {
|
|
||||||
continue 2;
|
|
||||||
}
|
|
||||||
$table->addRow([$addon_name]);
|
|
||||||
case 'disabled':
|
|
||||||
if ($enabled) {
|
|
||||||
continue 2;
|
|
||||||
}
|
|
||||||
$table->addRow([$addon_name]);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($subCmd === 'enabled' && $enabled === true) {
|
||||||
|
$table->addRow([$addon_name]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($subCmd === 'disabled' && $enabled === false) {
|
||||||
|
$table->addRow([$addon_name]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->out($table->getTable());
|
$this->out($table->getTable());
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -163,7 +163,7 @@ class Upload extends \Friendica\BaseModule
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logger->info('upload done');
|
$this->logger->info('upload done');
|
||||||
$this->return(200, "\n\n" . Images::getBBCodeByResource($resource_id, $owner['nickname'], $preview, $image->getExt()) . "\n\n");
|
$this->return(200, Images::getBBCodeByResource($resource_id, $owner['nickname'], $preview, $image->getExt()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -602,6 +602,8 @@ return [
|
||||||
'/{type:users}/{guid}' => [Module\Diaspora\Receive::class, [ R::POST]],
|
'/{type:users}/{guid}' => [Module\Diaspora\Receive::class, [ R::POST]],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'/remote_follow/{nickname}' => [Module\Profile\RemoteFollow::class, [R::GET, R::POST]],
|
||||||
|
|
||||||
'/security' => [
|
'/security' => [
|
||||||
'/password_too_long' => [Module\Security\PasswordTooLong::class, [R::GET, R::POST]],
|
'/password_too_long' => [Module\Security\PasswordTooLong::class, [R::GET, R::POST]],
|
||||||
],
|
],
|
||||||
|
|
|
@ -23,6 +23,10 @@ var DzFactory = function (max_imagesize) {
|
||||||
dictRemoveFile: dzStrings.dictRemoveFile,
|
dictRemoveFile: dzStrings.dictRemoveFile,
|
||||||
dictMaxFilesExceeded: dzStrings.dictMaxFilesExceeded,
|
dictMaxFilesExceeded: dzStrings.dictMaxFilesExceeded,
|
||||||
accept: function(file, done) {
|
accept: function(file, done) {
|
||||||
|
const targetTextarea = document.getElementById(textareaElementId);
|
||||||
|
if (targetTextarea.setRangeText) {
|
||||||
|
targetTextarea.setRangeText("\n[upload-" + file.name + "]\n", targetTextarea.selectionStart, targetTextarea.selectionEnd, "end");
|
||||||
|
}
|
||||||
done();
|
done();
|
||||||
},
|
},
|
||||||
init: function() {
|
init: function() {
|
||||||
|
@ -30,7 +34,8 @@ var DzFactory = function (max_imagesize) {
|
||||||
const targetTextarea = document.getElementById(textareaElementId);
|
const targetTextarea = document.getElementById(textareaElementId);
|
||||||
if (targetTextarea.setRangeText) {
|
if (targetTextarea.setRangeText) {
|
||||||
//if setRangeText function is supported by current browser
|
//if setRangeText function is supported by current browser
|
||||||
targetTextarea.setRangeText(serverResponse);
|
let u = "[upload-" + file.name + "]";
|
||||||
|
targetTextarea.setRangeText(serverResponse, targetTextarea.value.indexOf(u), targetTextarea.value.indexOf(u) + u.length, "end");
|
||||||
} else {
|
} else {
|
||||||
targetTextarea.focus();
|
targetTextarea.focus();
|
||||||
document.execCommand('insertText', false /*no UI*/, serverResponse);
|
document.execCommand('insertText', false /*no UI*/, serverResponse);
|
||||||
|
|
|
@ -92,6 +92,9 @@
|
||||||
<div id="comment-edit-preview-{{$id}}" class="comment-edit-preview" style="display:none;"></div>
|
<div id="comment-edit-preview-{{$id}}" class="comment-edit-preview" style="display:none;"></div>
|
||||||
|
|
||||||
<div id="permissions-section" style="display: none;">
|
<div id="permissions-section" style="display: none;">
|
||||||
|
<script>
|
||||||
|
dzFactory.setupDropzone('#dropzone-{{$id}}', 'comment-edit-text-{{$id}}');
|
||||||
|
</script>
|
||||||
{{if $type == 'post'}}
|
{{if $type == 'post'}}
|
||||||
<h3>{{$l10n.visibility_title}}</h3>
|
<h3>{{$l10n.visibility_title}}</h3>
|
||||||
{{$acl_selector nofilter}}
|
{{$acl_selector nofilter}}
|
||||||
|
@ -113,8 +116,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
dzFactory.setupDropzone('#dropzone-{{$id}}', 'comment-edit-text-{{$id}}');
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
var textareas = document.querySelectorAll(".expandable-textarea");
|
var textareas = document.querySelectorAll(".expandable-textarea");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue