1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-11 23:54:06 +02:00

Admin Panel: Entries Manager - using new Entries API.

This commit is contained in:
Awilum
2019-02-14 21:09:47 +03:00
parent 172c210c40
commit badedb71cf

View File

@@ -147,16 +147,15 @@ class EntriesManager
if (isset($action) && $action == 'save-form') {
if (Token::check((Http::post('token')))) {
$data = $_POST;
$_data = $_POST;
Arr::delete($data, 'token');
Arr::delete($data, 'action');
Arr::delete($data, 'content');
$data = [];
if (Http::post('content') !== null) {
Arr::set($data, 'content', $indenter->indent(Http::post('content')));
} else {
Arr::set($data, 'content', '');
Arr::delete($_data, 'token');
Arr::delete($_data, 'action');
foreach ($_data as $key => $_d) {
$data[$key] = $indenter->indent($_d);
}
if (Entries::update(Http::get('entry'), $data)) {