Skip to content

Commit

Permalink
PHP 8.1 fix, исправлена инициализация редакторов при загрузке фото в …
Browse files Browse the repository at this point in the history
…альбомы, ScssPhp обновлён до актуальной версии.
  • Loading branch information
fuzegit committed Dec 14, 2021
1 parent 2401122 commit b0fbaf7
Show file tree
Hide file tree
Showing 14 changed files with 513 additions and 261 deletions.
5 changes: 4 additions & 1 deletion system/config/theme_modern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,7 @@ custom_scss:
danger:
light:
dark:
vars: null
vars:
-
name: dropdown-item-padding-x
value: 1rem
412 changes: 230 additions & 182 deletions system/controllers/content/frontend.php

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions system/controllers/photos/actions/upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public function showUploadForm() {
'editor' => $this->options['editor'],
'presets' => $this->options['editor_presets']
]);
$editor_params['options']['id'] = false;

if ($this->request->has('submit')) {

Expand Down
21 changes: 14 additions & 7 deletions system/controllers/rating/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,25 @@ public function getVotes() {

return $this->get('rating_log', function ($item, $model) {

$item['ip'] = string_bintoip($item['ip']);
$guest_nickname = LANG_GUEST;

// формируем номер гостя
$_okets4 = explode('.', $item['ip']);
$_okets6 = explode(':', $item['ip']);
if($item['ip']) {

$item['user'] = array(
$item['ip'] = string_bintoip($item['ip']);

// формируем номер гостя
$_okets4 = explode('.', $item['ip']);
$_okets6 = explode(':', $item['ip']);

$guest_nickname .= '' . array_sum(array_merge($_okets4, $_okets6));
}

$item['user'] = [
'id' => $item['user_id'],
'slug' => $item['user_slug'],
'nickname' => (!empty($item['user_nickname']) ? $item['user_nickname'] : LANG_GUEST . '' . array_sum(array_merge($_okets4, $_okets6))),
'nickname' => (!empty($item['user_nickname']) ? $item['user_nickname'] : $guest_nickname),
'avatar' => $item['user_avatar']
);
];

return $item;
});
Expand Down
Loading

0 comments on commit b0fbaf7

Please sign in to comment.