فهرست منبع

Close links to posts/topics of users for visitors identified as bots

Visman 1 سال پیش
والد
کامیت
766e79b8ed
2فایلهای تغییر یافته به همراه8 افزوده شده و 2 حذف شده
  1. 4 1
      app/Models/Pages/Profile/View.php
  2. 4 1
      app/Models/Pages/Search.php

+ 4 - 1
app/Models/Pages/Profile/View.php

@@ -257,7 +257,10 @@ class View extends Profile
         ];
 
         if ($this->curUser->last_post > 0) {
-            if (1 === $this->user->g_search) {
+            if (
+                1 === $this->user->g_search
+                && ! $this->user->isBot
+            ) {
                 $fields['posts'] = [
                     'class'   => ['pline'],
                     'type'    => 'link',

+ 4 - 1
app/Models/Pages/Search.php

@@ -501,7 +501,10 @@ class Search extends Page
             case 'topics':
             case 'topics_subscriptions':
             case 'forums_subscriptions':
-                if (! isset($uid)) {
+                if (
+                    ! isset($uid)
+                    || $this->user->isBot
+                ) {
                     break;
                 }