mirror of
https://github.com/friendica/friendica
synced 2025-01-19 03:04:28 +00: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);
|
||||
|
||||
$this->appMode = $appMode;
|
||||
$this->l10n = $l10n;
|
||||
$this->dba = $dba;
|
||||
$this->appMode = $appMode;
|
||||
$this->l10n = $l10n;
|
||||
$this->dba = $dba;
|
||||
|
||||
AddonCore::loadAddons();
|
||||
}
|
||||
|
@ -121,27 +121,28 @@ HELP;
|
|||
$this->out($this->getHelp());
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (AddonCore::getAvailableList() as $addon) {
|
||||
$addon_name = $addon[0];
|
||||
$enabled = AddonCore::isEnabled($addon_name) ? "enabled" : "disabled";
|
||||
switch ($subCmd) {
|
||||
case 'all':
|
||||
$table->addRow([$addon_name, $enabled]);
|
||||
break;
|
||||
case 'enabled':
|
||||
if (!$enabled) {
|
||||
continue 2;
|
||||
}
|
||||
$table->addRow([$addon_name]);
|
||||
case 'disabled':
|
||||
if ($enabled) {
|
||||
continue 2;
|
||||
}
|
||||
$table->addRow([$addon_name]);
|
||||
break;
|
||||
$enabled = AddonCore::isEnabled($addon_name);
|
||||
|
||||
if ($subCmd === 'all') {
|
||||
$table->addRow([$addon_name, $enabled ? 'enabled' : 'disabled']);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($subCmd === 'enabled' && $enabled === true) {
|
||||
$table->addRow([$addon_name]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($subCmd === 'disabled' && $enabled === false) {
|
||||
$table->addRow([$addon_name]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$this->out($table->getTable());
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -163,7 +163,7 @@ class Upload extends \Friendica\BaseModule
|
|||
}
|
||||
|
||||
$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]],
|
||||
],
|
||||
|
||||
'/remote_follow/{nickname}' => [Module\Profile\RemoteFollow::class, [R::GET, R::POST]],
|
||||
|
||||
'/security' => [
|
||||
'/password_too_long' => [Module\Security\PasswordTooLong::class, [R::GET, R::POST]],
|
||||
],
|
||||
|
|
|
@ -23,6 +23,10 @@ var DzFactory = function (max_imagesize) {
|
|||
dictRemoveFile: dzStrings.dictRemoveFile,
|
||||
dictMaxFilesExceeded: dzStrings.dictMaxFilesExceeded,
|
||||
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();
|
||||
},
|
||||
init: function() {
|
||||
|
@ -30,7 +34,8 @@ var DzFactory = function (max_imagesize) {
|
|||
const targetTextarea = document.getElementById(textareaElementId);
|
||||
if (targetTextarea.setRangeText) {
|
||||
//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 {
|
||||
targetTextarea.focus();
|
||||
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="permissions-section" style="display: none;">
|
||||
<script>
|
||||
dzFactory.setupDropzone('#dropzone-{{$id}}', 'comment-edit-text-{{$id}}');
|
||||
</script>
|
||||
{{if $type == 'post'}}
|
||||
<h3>{{$l10n.visibility_title}}</h3>
|
||||
{{$acl_selector nofilter}}
|
||||
|
@ -113,8 +116,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<script>
|
||||
dzFactory.setupDropzone('#dropzone-{{$id}}', 'comment-edit-text-{{$id}}');
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
var textareas = document.querySelectorAll(".expandable-textarea");
|
||||
|
||||
|
|
Loading…
Reference in a new issue