Browse Source

Merge branch 'master' of https://github.com/unaio/una

RomanL 4 years ago
parent
commit
6ffb628435

+ 26 - 0
modules/base/general/classes/BxBaseModGeneralSearchResult.php

@@ -55,6 +55,32 @@ class BxBaseModGeneralSearchResult extends BxTemplSearchResult
         return parent::rss();
     }
 
+    protected function addCustomConditions($CNF, $oProfile, $sMode, $aParams)
+    {
+        $this->addConditionsForAuthorStatus($CNF);
+    }
+
+    protected function addConditionsForAuthorStatus($CNF)
+    {
+        if (empty($CNF['FIELD_AUTHOR']))
+            return;
+
+        $this->aCurrent['restriction']['statusAuthor'] = [
+            'value' => 'active',
+            'field' => 'status',
+            'operator' => '=',
+            'table' => 'sys_profiles',
+        ];
+
+        $this->aCurrent['join']['statusAuthor'] = [
+            'type' => 'INNER',
+            'table' => 'sys_profiles',
+            'mainField' => $CNF['FIELD_AUTHOR'],
+            'onField' => 'id',
+            'joinFields' => array(),
+        ];
+    }
+
     /**
      * Add conditions for private content
      */

+ 1 - 0
modules/boonex/ads/classes/BxAdsSearchResult.php

@@ -130,6 +130,7 @@ class BxAdsSearchResult extends BxBaseModTextSearchResult
         $this->processReplaceableMarkers($oProfileAuthor);
 
         $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+        $this->addCustomConditions($CNF, $oProfileAuthor, $sMode, $aParams);
     }
 
     function getAlterOrder()

+ 1 - 0
modules/boonex/albums/classes/BxAlbumsSearchResult.php

@@ -129,6 +129,7 @@ class BxAlbumsSearchResult extends BxBaseModTextSearchResult
         $this->processReplaceableMarkers($oProfileAuthor);
 
         $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+        $this->addCustomConditions($CNF, $oProfileAuthor, $sMode, $aParams);
     }
 
     function displayResultBlock ()

+ 2 - 0
modules/boonex/albums/classes/BxAlbumsSearchResultMedia.php

@@ -147,6 +147,8 @@ class BxAlbumsSearchResultMedia extends BxBaseModTextSearchResult
 
         $this->removeContainerClass('bx-def-margin-bottom-neg');
         $this->addContainerClass(array('bx-def-margin-sec-lefttopright-neg', 'bx-def-margin-sec-bottom-neg', 'bx-albums-medias-wrapper'));
+
+        $this->addCustomConditions($CNF, $oProfileAuthor, $sMode, $aParams);
     }
 
     function getAlterOrder()

+ 1 - 0
modules/boonex/market/classes/BxMarketSearchResult.php

@@ -124,6 +124,7 @@ class BxMarketSearchResult extends BxBaseModTextSearchResult
         $this->processReplaceableMarkers($oProfileAuthor);
 
         $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+        $this->addCustomConditions($CNF, $oProfileAuthor, $sMode, $aParams);
     }
 
     public function setMetaType($s)

+ 1 - 0
modules/boonex/photos/classes/BxPhotosSearchResult.php

@@ -132,6 +132,7 @@ class BxPhotosSearchResult extends BxBaseModTextSearchResult
         $this->processReplaceableMarkers($oProfileAuthor);
 
         $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+        $this->addCustomConditions($CNF, $oProfileAuthor, $sMode, $aParams);
     }
 
     function getSearchData ()

+ 1 - 0
modules/boonex/polls/classes/BxPollsSearchResult.php

@@ -125,6 +125,7 @@ class BxPollsSearchResult extends BxBaseModTextSearchResult
         $this->processReplaceableMarkers($oProfileAuthor);
 
         $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+        $this->addCustomConditions($CNF, $oProfileAuthor, $sMode, $aParams);
     }
 
     function displaySearchUnit ($aData)

+ 1 - 0
modules/boonex/posts/classes/BxPostsSearchResult.php

@@ -124,6 +124,7 @@ class BxPostsSearchResult extends BxBaseModTextSearchResult
         $this->processReplaceableMarkers($oProfileAuthor);
 
         $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+        $this->addCustomConditions($CNF, $oProfileAuthor, $sMode, $aParams);
     }
 }
 

+ 2 - 0
modules/boonex/reviews/classes/BxReviewsSearchResult.php

@@ -130,6 +130,8 @@ class BxReviewsSearchResult extends BxBaseModTextSearchResult
         } else {
             $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
         }
+
+        $this->addCustomConditions($CNF, $oProfileAuthor, $sMode, $aParams);
     }
 }
 

+ 1 - 0
modules/boonex/shopify/classes/BxShopifySearchResult.php

@@ -116,6 +116,7 @@ class BxShopifySearchResult extends BxBaseModTextSearchResult
         $this->processReplaceableMarkers($oProfileAuthor);
 
         $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+        $this->addCustomConditions($CNF, $oProfileAuthor, $sMode, $aParams);
     }
 
     function displayResultBlock()

+ 1 - 0
modules/boonex/snipcart/classes/BxSnipcartSearchResult.php

@@ -116,6 +116,7 @@ class BxSnipcartSearchResult extends BxBaseModTextSearchResult
         $this->processReplaceableMarkers($oProfileAuthor);
 
         $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+        $this->addCustomConditions($CNF, $oProfileAuthor, $sMode, $aParams);
     }
 
     function getAlterOrder()

+ 1 - 0
modules/boonex/videos/classes/BxVideosSearchResult.php

@@ -124,6 +124,7 @@ class BxVideosSearchResult extends BxBaseModTextSearchResult
         $this->processReplaceableMarkers($oProfileAuthor);
 
         $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+        $this->addCustomConditions($CNF, $oProfileAuthor, $sMode, $aParams);
     }
 }
 

+ 9 - 0
plugins_public/tailwind/css/tailwind.css

@@ -454,6 +454,10 @@
         @apply w-full;
     }
 
+    .bx-artificer .bx-popup {
+        @apply relative ring-1 ring-gray-200 dark:ring-gray-700 bg-white dark:bg-gray-800 rounded-md shadow;
+    }
+
     .bx-artificer .bx-popup-width {
         @apply w-full md:w-128;
     }
@@ -582,4 +586,9 @@
     .bx-artificer .flickity-button {
         @apply text-gray-700 dark:text-gray-300 hover:text-gray-800 dark:hover:text-white bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 opacity-75 hover:opacity-100;
     }
+
+    /* 3d Party: Quill */
+    .bx-artificer .ql-mention-list li {
+        @apply flex items-center px-4 py-2 text-gray-600 dark:text-gray-300 hover:bg-gray-200 dark:hover:text-gray-100 dark:hover:bg-gray-700 hover:text-gray-900 text-sm font-normal;
+    }
 }

File diff suppressed because it is too large
+ 0 - 0
plugins_public/tailwind/css/tailwind.min.css


Some files were not shown because too many files changed in this diff