AntonLV hace 5 años
padre
commit
bc3d5e74e4

+ 6 - 2
modules/base/profile/classes/BxBaseModProfileTemplate.php

@@ -78,14 +78,18 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
         }
 
         $aVars = $this->unitVars($aData, $isCheckPrivateContent, $mixedTemplate, $aParams);
-        bx_alert($oModule->getName(), 'unit', 0, 0, array(
+        
+        $aExtras = array(
+            'module' => $oModule->getName(),
             'data' => $aData,
             'check_private_content' => $isCheckPrivateContent,
             'template' => $mixedTemplate,
             'params' => $aParams,
             'tmpl_name' => &$sTemplate,
             'tmpl_vars' => &$aVars
-        ));
+        );
+        bx_alert('profile', 'unit', 0, 0, $aExtras);
+        bx_alert($aExtras['module'], 'unit', 0, 0, $aExtras);
  
         return $this->parseHtmlByName($sTemplate, $aVars);
     }

+ 1 - 11
modules/boonex/artificer/classes/BxArtificerAlertsResponse.php

@@ -32,19 +32,9 @@ class BxArtificerAlertsResponse extends BxDolAlertsResponse
         $this->$sMethod($oAlert);
     }
 
-    protected function _processBxPersonsUnit($oAlert)
-    {
-        return $this->_processProfileUnit($oAlert);
-    }
-
-    protected function _processBxOrganizationsUnit($oAlert)
-    {
-        return $this->_processProfileUnit($oAlert);
-    }
-
     protected function _processProfileUnit($oAlert)
     {
-        $sModule = $oAlert->sUnit;
+        $sModule = $oAlert->aExtras['module'];
         $oModule = BxDolModule::getInstance($sModule);
         if(!$oModule)
             return;

+ 1 - 23
modules/boonex/artificer/data/template/mod_profile/unit_wo_cover.html

@@ -1,23 +1 @@
-<div class="__class__ bx-def-unit flex items-center mb-4 mr-2">
-    <div class="bx-def-unit-img bx-def-__size__ bx-def-__size__-size __class_size__">
-        <a class="text-center" href="__content_url__" onclick="__content_click__">
-            <bx_if:show_thumb_image>
-                <img class="bx-base-pofile-unit-thumb bx-def-__size__ bx-def-__size__-size __class_size__ rounded-full box-border" src="__thumb_url__" />
-            </bx_if:show_thumb_image>
-            <bx_if:show_thumb_letter>
-                <p class="bx-base-pofile-unit-thumb bx-def-__size__ bx-def-__size__-size __class_size__ rounded-full box-border" style="background-color:rgba(__color__)">__letter__</p>
-            </bx_if:show_thumb_letter>
-        </a>
-        <bx_if:show_online>
-            <div class="bx-base-pofile-unit-online"></div>
-        </bx_if:show_online>
-    </div>
-    <div class="bx-def-unit-info bx-def-__size__-size-min-height bx-def-__size__-size-max-height flex items-center ml-4">
-        <div class="bx-def-unit-info-cnt box-border">
-            <div class="bx-def-unit-line">
-                <a class="bx-def-unit-info-title" href="__content_url__" onclick="__content_click__">__title__</a>
-            </div>
-            <div class="bx-def-unit-line text-sm text-gray-500 dark:text-gray-400">__addon__</div>
-        </div>
-    </div>
-</div>
+<bx_include_auto_mod_profile:unit.html />

+ 1 - 2
modules/boonex/artificer/install/sql/enable.sql

@@ -7,8 +7,7 @@ INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALU
 SET @iHandler := LAST_INSERT_ID();
 
 INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
-('bx_persons', 'unit', @iHandler),
-('bx_organizations', 'unit', @iHandler);
+('profile', 'unit', @iHandler);
 
 
 -- injections