AlexeyUna %!s(int64=7) %!d(string=hai) anos
pai
achega
f0ffb707d0
Modificáronse 1 ficheiros con 17 adicións e 8 borrados
  1. 17 8
      modules/boonex/timeline/classes/BxTimelineModule.php

+ 17 - 8
modules/boonex/timeline/classes/BxTimelineModule.php

@@ -3521,10 +3521,22 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
                 'tab' => $sTab
             );
 
-        $sType = BX_TIMELINE_TYPE_DEFAULT;
+        $sType = BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS;
         $sView = BX_TIMELINE_VIEW_DEFAULT;
         $sFilter = BX_TIMELINE_FILTER_ALL;
 
+        $aModules = array();
+
+        switch($sPage){
+            case 'profile':
+                $sType = BX_BASE_MOD_NTFS_TYPE_OWNER;
+                $sFilter = BX_TIMELINE_FILTER_OWNER;
+                break;
+            default:
+                if ($this -> _oDb -> isModuleByName($sPage))
+                   $aModules = array($sPage);
+        }
+
         switch($sTab)
         {
             case 'latest':
@@ -3533,17 +3545,14 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
             case 'popular':
                 $sType = BX_TIMELINE_TYPE_HOT;
                 break;
-            case 'profile':
-                $sType = BX_BASE_MOD_NTFS_TYPE_OWNER;
+            case 'feed':
+                $sType = BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS;
                 break;
             default:
-                $sType = BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS;
+                if ($this -> _oDb -> isModuleByName($sTab))
+                    $aModules = array($sTab);
         }
 
-        $aModules = array();
-        if (!in_array($sPage, array('home', 'profile')))
-           $aModules = array($sPage);
-
         $aParams = $this->getParams($sView, $sType, $iProfileId, $iStart, $iPerPage, $sFilter, $aModules);
         $aData = $this->_oDb->getEvents($aParams, true);