Procházet zdrojové kódy

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

RomanL před 8 roky
rodič
revize
a2d3701da7

+ 5 - 5
modules/boonex/timeline/classes/BxTimelineDb.php

@@ -441,12 +441,12 @@ class BxTimelineDb extends BxBaseModNotificationsDb
 
                 if(isset($aParams['type']))
                     $sWhereClause .= $this->prepareAsString("AND `{$this->_sTable}`.`type`=? ", $aParams['type']);
-                        if(isset($aParams['action']))
-                                $sWhereClause .= $this->prepareAsString("AND `{$this->_sTable}`.`action`=? ", $aParams['action']);
-                        if(isset($aParams['object_id']))
-                                $sWhereClause .= $this->prepareAsString("AND `{$this->_sTable}`.`object_id`=? ", $aParams['object_id']);
+                if(isset($aParams['action']))
+                    $sWhereClause .= $this->prepareAsString("AND `{$this->_sTable}`.`action`=? ", $aParams['action']);
+                if(isset($aParams['object_id']))
+                    $sWhereClause .= $this->prepareAsString("AND `{$this->_sTable}`.`object_id`=? ", $aParams['object_id']);
 
-                        $sLimitClause = "LIMIT 1";
+                $sLimitClause = "LIMIT 1";
                 break;
 
             case 'reposted_by_descriptor':

+ 6 - 4
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -1680,11 +1680,13 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
                     $aReposted = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $aContent['object_id']));
                     $aReposted = $this->_getCommonData($aReposted, $aBrowseParams);
                 } 
-                else
-                	$aReposted = $this->_getSystemData($aContent, $aBrowseParams);
+                else {
+                    $aReposted = $this->_oDb->getEvents(array_merge(array('browse' => 'descriptor'), $aContent));
+                    $aReposted = $this->_getSystemData($aReposted, $aBrowseParams);
+                }
 
-				if(empty($aReposted) || !is_array($aReposted))
-					return array();
+                if(empty($aReposted) || !is_array($aReposted))
+                    return array();
 
                 $aResult['content'] = array_merge($aContent, $aReposted['content']);
                 $aResult['content']['parse_type'] = !empty($aReposted['content_type']) ? $aReposted['content_type'] : BX_TIMELINE_PARSE_TYPE_DEFAULT;