Просмотр исходного кода

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

AntonLV 6 лет назад
Родитель
Сommit
96dbcc6c65

+ 2 - 1
inc/classes/BxDolCmts.php

@@ -1483,7 +1483,8 @@ class BxDolCmts extends BxDolFactory implements iBxDolReplaceable, iBxDolContent
             $oProfile->getDisplayName(),
             $oProfile->getUrl(),
             $oProfile->getThumb(),
-            $oProfile->getUnit(0, array('template' => 'unit_wo_info'))
+            $oProfile->getUnit(0, array('template' => 'unit_wo_info')),
+            $oProfile->getBadges()
         );
     }
 

+ 1 - 1
inc/classes/BxDolStorage.php

@@ -716,7 +716,7 @@ abstract class BxDolStorage extends BxDolFactory implements iBxDolFactoryObject
     {
         if ($isCheckAllAccountProfiles && ($oProfile = BxDolProfile::getInstance($iProfileId))) {
             $oAccount = $oProfile->getAccountObject();
-            $aProfiles = $oAccount->getProfilesIds(false);
+            $aProfiles = $oAccount->getProfilesIds(false, false);
             return $this->_oDb->getGhosts($aProfiles, $iContentId, $isAdmin);
         }
         

+ 1 - 0
modules/base/general/classes/BxBaseModGeneralDb.php

@@ -59,6 +59,7 @@ class BxBaseModGeneralDb extends BxDolModuleDb
 
             case 'search_ids':
                 $this->_getEntriesBySearchIds($aParams, $aMethod, $sSelectClause, $sJoinClause, $sWhereClause, $sOrderClause, $sLimitClause);
+                bx_alert('system', 'search_ids', 0, 0, array('module_name' => $this->_oConfig->getName(), 'params' => &$aParams, 'select_clause' => &$sSelectClause, 'join_clause' => &$sJoinClause, 'where_clause' => &$sWhereClause, 'order_clause' => &$sOrderClause, 'limit_clause' => &$sLimitClause));
                 break;
 
             case 'all_ids':

+ 43 - 0
modules/boonex/events/classes/BxEventsPageEntriesInContext.php

@@ -0,0 +1,43 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Events Events
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Entries user joined to.
+ */
+class BxEventsPageEntriesInContext extends BxBaseModGroupsPageJoinedEntries
+{
+    protected $MODULE;
+
+    protected $_oModule;
+    
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_events';
+        $this->_oModule = BxDolModule::getInstance($this->MODULE);
+        
+        parent::__construct($aObject, $oTemplate);
+    }
+    
+    public function getCode ()
+    {
+        $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
+        if ($iProfileId) {
+            if (!$this->_oModule->serviceIsEnableForContext($iProfileId)){
+                $this->_oTemplate->displayPageNotFound();
+                return;
+            }
+        }
+        
+        return parent::getCode();
+    }
+}
+
+/** @} */

+ 0 - 13
modules/boonex/events/classes/BxEventsPageJoinedEntries.php

@@ -25,19 +25,6 @@ class BxEventsPageJoinedEntries extends BxBaseModGroupsPageJoinedEntries
         
         parent::__construct($aObject, $oTemplate);
     }
-    
-    public function getCode ()
-    {
-        $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
-        if ($iProfileId) {
-            if (!$this->_oModule->serviceIsEnableForContext($iProfileId)){
-                $this->_oTemplate->displayPageNotFound();
-                return;
-            }
-        }
-        
-        return parent::getCode();
-    }
 }
 
 /** @} */

+ 1 - 1
modules/boonex/events/install/sql/enable.sql

@@ -138,7 +138,7 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbo
 -- PAGE: entries in context
 
 INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
-('bx_events_context', 'events-context', '_bx_events_page_title_sys_entries_in_context', '_bx_events_page_title_entries_in_context', 'bx_events', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxEventsPageJoinedEntries', 'modules/boonex/events/classes/BxEventsPageJoinedEntries.php');
+('bx_events_context', 'events-context', '_bx_events_page_title_sys_entries_in_context', '_bx_events_page_title_entries_in_context', 'bx_events', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxEventsPageEntriesInContext', 'modules/boonex/events/classes/BxEventsPageEntriesInContext.php');
 
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
 ('bx_events_context', 1, 'bx_events', '_bx_events_page_block_title_sys_entries_in_context', '_bx_events_page_block_title_entries_in_context', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_events\";s:6:\"method\";s:14:\"browse_context\";}', 0, 0, 1, 1),

+ 3 - 0
template/css/cmts.css

@@ -521,6 +521,9 @@ div.cmt-mood-buttons a:hover {
 div.cmt-mood-buttons i.cmt-mood-star {
     color: transparent;
 }
+.cmt-meta .bx-badge-compact {
+    display: inline-block;
+}
 
 /*--- Rating Block Styles ---*/
 .cmts-box-rating div.cmt-mood i.cmt-mood-star,

+ 3 - 2
template/scripts/BxBaseAccountForms.php

@@ -135,7 +135,7 @@ class BxBaseAccountForms extends BxDolProfileForms
 
     }
 
-    public function onAccountCreated ($iAccountId, $isSetPendingApproval, $iAction = BX_PROFILE_ACTION_MANUAL)
+    public function onAccountCreated ($iAccountId, $isSetPendingApproval, $iAction = BX_PROFILE_ACTION_MANUAL, $bNeedToLogin = true)
     {
         // alert
         bx_alert('account', 'add', $iAccountId, 0);
@@ -159,7 +159,8 @@ class BxBaseAccountForms extends BxDolProfileForms
         bx_alert('account', 'added', $iAccountId);
 
         // login to the created account automatically
-        bx_login($iAccountId);
+        if ($bNeedToLogin)
+            bx_login($iAccountId);
 
         return $iProfileId;
     }

+ 4 - 4
template/scripts/BxBaseCmtsMenuUnitMeta.php

@@ -43,18 +43,18 @@ class BxBaseCmtsMenuUnitMeta extends BxTemplMenuUnitMeta
 
     protected function _getMenuItemAuthor($aItem)
     {
-        list($sAuthorName, $sAuthorLink, $sAuthorIcon, $sAuthorUnit) = $this->_oCmts->getAuthorInfo($this->_aCmt['cmt_author_id']);
-
+        list($sAuthorName, $sAuthorLink, $sAuthorIcon, $sAuthorUnit, $sAuthorBadges) = $this->_oCmts->getAuthorInfo($this->_aCmt['cmt_author_id']);
+    
         if(!empty($sAuthorLink))
             return $this->getUnitMetaItemLink($sAuthorName, array(
                 'href' => $sAuthorLink,
                 'class' => $this->_sStylePrefix . '-username',
                 'title' => bx_html_attribute($sAuthorName),
-            ));
+            )). $sAuthorBadges;
         else
             return $this->getUnitMetaItemText($sAuthorName, array(
                 'class' => $this->_sStylePrefix . '-username'
-            ));
+            )). $sAuthorBadges;
     }
     
     protected function _getMenuItemDate($aItem)