Skip to content

Commit

Permalink
UPDATE: HLEB v1.6.70
Browse files Browse the repository at this point in the history
+ некоторые изменения...
  • Loading branch information
evgip committed Aug 26, 2022
1 parent 01e9a3e commit 1c53830
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function index()
]
);

is_return(__('msg.change_saved'), 'success', $redirect);
is_return(__('msg.change_saved'), 'success', url('login'));
}

// Email Activation
Expand All @@ -164,7 +164,7 @@ public function index()
// Sending email
SendEmail::mailText($active_uid, 'activate.email', ['link' => url('activate.code', ['code' => $email_code])]);

is_return(__('msg.change_saved'), 'success', $redirect);
is_return(__('msg.check_your_email'), 'success', url('login'));
}

// Show registration form with invite
Expand Down
23 changes: 16 additions & 7 deletions app/Controllers/Item/EditItemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ public function change()
'item_content_soft' => $data['content_soft'] ?? '',
'item_published' => $published,
'item_user_id' => $new_user_id,
'item_close_replies' => $data['close_replies'] == 'on' ? 1 : null,
'item_is_forum' => $data['forum'] == 'on' ? 1 : null,
'item_is_portal' => $data['portal'] == 'on' ? 1 : null,
'item_is_blog' => $data['blog'] == 'on' ? 1 : null,
'item_is_reference' => $data['reference'] == 'on' ? 1 : null,
'item_is_soft' => $data['soft'] == 'on' ? 1 : null,
'item_is_github' => $data['github'] == 'on' ? 1 : null,
'item_close_replies' => self::toggle($data['close_replies']),
'item_is_forum' => self::toggle($data['forum']),
'item_is_portal' => self::toggle($data['portal']),
'item_is_blog' => self::toggle($data['blog']),
'item_is_reference' => self::toggle($data['reference']),
'item_is_soft' => self::toggle($data['soft']),
'item_is_github' => self::toggle($data['github']),
'item_post_related' => $post_related ?? null,
'item_github_url' => $data['github_url'] ?? null,
]
Expand All @@ -138,9 +138,18 @@ public function change()
foreach ($topics as $row) {
$arr[] = $row;
}

FacetModel::addItemFacets($arr, $item['item_id']);
}

is_return(__('msg.change_saved'), 'success', url('web'));
}

public static function toggle($value)
{
$data = $value ?? false;

return $data == 'on' ? 1 : null;
}

}
7 changes: 5 additions & 2 deletions app/Controllers/Post/EditPostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ public function change()

if (UserData::checkAdmin()) {
$post_merged_id = Request::getPostInt('post_merged_id');
if (PostModel::getSlug($slug = $this->getSlug(Request::getPost('post_slug')))) {
$slug = $slug . "-";
$post_slug = Request::getPost('post_slug');
if ($post_slug != $post['post_slug']) {
if (PostModel::getSlug($slug = $this->getSlug($post_slug))) {
$slug = $slug . "-";
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"require": {
"php": ">=7.4.0",
"ext-pdo": "*",
"phphleb/framework": ">=1.6.69",
"phphleb/framework": ">=1.6.70",
"phphleb/imageresizer": "dev-master",
"phphleb/debugpan": "1.*",
"phphleb/radjax": "dev-master",
Expand Down
2 changes: 1 addition & 1 deletion public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// All calls are sent to this file.
// Все вызовы направляются в этот файл.
define('HLEB_START', microtime(true));
define('HLEB_FRAME_VERSION', "1.6.69");
define('HLEB_FRAME_VERSION', "1.6.70");
define('HLEB_PUBLIC_DIR', __DIR__);

// General headers.
Expand Down
3 changes: 2 additions & 1 deletion resources/views/default/global/base.footer.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
</div>

<footer class="footer box-shadow-top" itemtype="http://schema.org/WPFooter">
<?php if (UserData::getUserScroll() == false || $data['type'] != 'main') : ?>
<?php $type = $data['type'] ?? false; ?>
<?php if (UserData::getUserScroll() == false || $type != 'main') : ?>
<div class="wrap">
<div class="left">
<div class="mb5">
Expand Down
3 changes: 2 additions & 1 deletion resources/views/qa/global/base.footer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
</div>
<footer class="footer box-shadow-top" itemtype="http://schema.org/WPFooter">
<?php if (UserData::getUserScroll() == false || $data['type'] != 'main') : ?>
<?php $type = $data['type'] ?? false; ?>
<?php if (UserData::getUserScroll() == false || $type != 'main') : ?>
<div class="wrap">
<div class="left">
<div class="mb5">
Expand Down

0 comments on commit 1c53830

Please sign in to comment.