RomanL hace 6 años
padre
commit
337a47624d

+ 4 - 4
modules/base/general/classes/BxBaseModGeneralTemplate.php

@@ -256,19 +256,17 @@ class BxBaseModGeneralTemplate extends BxDolModuleTemplate
         
         $oFavorite = BxDolFavorite::getObjectInstance($CNF['OBJECT_FAVORITES'], 0, true);
         $aListsData = $oFavorite->getQueryObject()->getList(array('type' => 'active', 'author_id' => $oProfile->id(), 'need_default' => true, 'start' => $iStart, 'limit' => $iPerPage + 1));
-        
         $iNum = count($aListsData);
         if ($iNum > $iPerPage)
             $aListsData = array_slice($aListsData, 0, $iPerPage);
         
         $oPrivacy = BxDolPrivacy::getObjectInstance($CNF['OBJECT_PRIVACY_LIST_VIEW']);
         $aListsTmpl = array();
-        
         foreach($aListsData as $iListId => $sName) {
             $aParams['list_id'] = $iListId;
             if ($oPrivacy->check($iListId) || $iListId == 0){
                 $aTmp = $this->getModule()->_serviceBrowse ('favorite', array_merge(array('user' => $oProfile->id()), $aParams), BX_DB_PADDING_DEF, $bEmptyMessage, false);
-                if ($aTmp && $aTmp['content'] || true){
+                if ($aTmp && $aTmp['content']){
                     $aListsTmpl[] = array(
                         'title' => $sName, 
                         'content_url' => $this->getModule()->_getFavoriteListUrl($iListId, $oProfile->id()),
@@ -291,8 +289,10 @@ class BxBaseModGeneralTemplate extends BxDolModuleTemplate
             'per_page' => $iPerPage,
             'start' => $iStart,
         ));
+        if (count($aListsTmpl) > 0)
+            return $this->parseHtmlByName('favorite-lists.html', array('bx_repeat:items' => $aListsTmpl)) . $oPaginate->getSimplePaginate() . $oFavorite->getJsScript();
         
-        return $this->parseHtmlByName('favorite-lists.html', array('bx_repeat:items' => $aListsTmpl)) . $oPaginate->getSimplePaginate() . $oFavorite->getJsScript();
+        return false;
     }
     
     public function getFavoritesListInfo($aList, $oProfile)

+ 23 - 0
modules/base/groups/classes/BxBaseModGroupsPageListEntry.php

@@ -0,0 +1,23 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    BaseGroups Base classes for groups modules
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * List entry page
+ */
+class BxBaseModGroupsPageListEntry extends BxBaseModProfilePageListEntry
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 23 - 0
modules/base/profile/classes/BxBaseModProfilePageListEntry.php

@@ -0,0 +1,23 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    BaseProfile Base classes for profile modules
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * List entry page
+ */
+class BxBaseModProfilePageListEntry extends BxBaseModGeneralPageListEntry
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */