Skip to content

Commit

Permalink
Merge pull request #14607 from jdalsem/6.0-fixes
Browse files Browse the repository at this point in the history
chore(core): updated some deprecated code and removed unused code
  • Loading branch information
jeabakker committed Apr 22, 2024
2 parents e79ea42 + 7320210 commit 3e20311
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
5 changes: 3 additions & 2 deletions engine/classes/Elgg/Logger.php
Expand Up @@ -8,6 +8,7 @@
use Elgg\Logger\BacktraceProcessor;
use Elgg\Logger\ElggLogFormatter;
use Monolog\Handler\ErrorLogHandler;
use Monolog\Level;
use Monolog\Processor\MemoryPeakUsageProcessor;
use Monolog\Processor\MemoryUsageProcessor;
use Monolog\Processor\ProcessIdProcessor;
Expand Down Expand Up @@ -98,7 +99,7 @@ public static function factory(InputInterface $input = null, OutputInterface $ou

$handler->setFormatter($formatter);

$handler->pushProcessor(new BacktraceProcessor(self::ERROR));
$handler->pushProcessor(new BacktraceProcessor(Level::Error));
} else {
$handler = new ErrorLogHandler();

Expand All @@ -113,7 +114,7 @@ public static function factory(InputInterface $input = null, OutputInterface $ou
$handler->pushProcessor(new MemoryUsageProcessor());
$handler->pushProcessor(new MemoryPeakUsageProcessor());
$handler->pushProcessor(new ProcessIdProcessor());
$handler->pushProcessor(new BacktraceProcessor(self::WARNING));
$handler->pushProcessor(new BacktraceProcessor(Level::Warning));
}

$handler->pushProcessor(new PsrLogMessageProcessor());
Expand Down
9 changes: 0 additions & 9 deletions mod/theme_sandbox/views/default/theme_sandbox/forms.php
Expand Up @@ -561,15 +561,6 @@
'#label' => 'Long textarea input (.elgg-input-longtext) with a disabled editor:',
]);

echo elgg_view_field([
'#type' => 'longtext',
'name' => 'f14b',
'id' => 'f14b',
'value' => $ipsum,
'visual' => false,
'#label' => 'Long textarea input (.elgg-input-longtext) without a visual editor activated by default:',
]);

echo elgg_view_field([
'#type' => 'longtext',
'name' => 'f14c',
Expand Down
12 changes: 3 additions & 9 deletions views/default/input/longtext.php
Expand Up @@ -3,13 +3,9 @@
* Elgg long text input
* Displays a long text input field that can use WYSIWYG editor
*
* @uses $vars['value'] The current value, if any - will be html encoded
* @uses $vars['disabled'] Is the input field disabled?
* @uses $vars['class'] Additional CSS class
* @uses $vars['visual'] Activate WYSIWYG editor immediately
* If disabled, will display a plaintext input with
* a link to activate the visual editor
* @uses $vars['value'] The current value, if any - will be html encoded
* @uses $vars['disabled'] Is the input field disabled?
* @uses $vars['class'] Additional CSS class
* @uses $vars['editor'] Enable WYSIWYG support
* Requires a plugin that implements a WYWIWYG library
* (e.g. bundled ckeditor plugin)
Expand All @@ -29,13 +25,11 @@

$editor_opts = (array) elgg_extract('editor_options', $vars, []);
$editor_opts['disabled'] = !elgg_extract('editor', $vars, true);
$editor_opts['state'] = elgg_extract('visual', $vars, true) ? 'visual' : 'html';
$editor_opts['required'] = elgg_extract('required', $vars);

unset($vars['editor']);
unset($vars['editor_options']);
unset($vars['editor_type']);
unset($vars['visual']);

$vars['data-editor-opts'] = json_encode($editor_opts);

Expand Down

0 comments on commit 3e20311

Please sign in to comment.