Explorar el Código

Ticket #4971 - Build-in API support: Get rid of 'modal_view' param.

AntonLV hace 9 meses
padre
commit
d14e625405

+ 2 - 2
modules/boonex/notifications/classes/BxNtfsTemplate.php

@@ -290,7 +290,7 @@ class BxNtfsTemplate extends BxBaseModNotificationsTemplate
 
             $aEvent['content'] = array_merge($aEvent['content'], $aLinks);
             $aEvent['content'] = array_intersect_key($aEvent['content'], array_flip([
-                'entry_url', 'entry_url_api', 'subentry_url', 'subentry_url_api', 'modal_view'
+                'entry_url', 'entry_url_api', 'subentry_url', 'subentry_url_api'
             ]));
 
             if(($sKey = 'content_parsed') && is_array($aEvent[$sKey])) {
@@ -301,7 +301,7 @@ class BxNtfsTemplate extends BxBaseModNotificationsTemplate
                 $aEvent[$sKey] = html_entity_decode($aEvent[$sKey]);
 
             return array_intersect_key($aEvent, array_flip([
-                'id', 'owner_id', 'content', 'content_parsed', 'date', 'author_data'
+                'id', 'owner_id', 'type', 'content', 'content_parsed', 'date', 'author_data'
             ]));
         }
 

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

@@ -2613,7 +2613,6 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
             'entry_summary' => $sEntrySummary,
             'entry_author' => $iEntryAuthor,
             'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
-            'modal_view' => $this->getName()            
         ];
     }
 
@@ -2677,7 +2676,6 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
             'subentry_url_api' => $oComment->getItemUrlApi($iCommentId, '{bx_url_root}'),
             'subentry_summary' => $oComment->getViewText($iCommentId),
             'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
-            'modal_view' => $this->getName()
         ];
     }
 
@@ -2701,9 +2699,7 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
      */
     public function serviceGetNotificationsReply($aEvent)
     {
-        return array_merge(parent::serviceGetNotificationsReply($aEvent), [
-            'modal_view' => $this->getName()
-        ]);
+        return parent::serviceGetNotificationsReply($aEvent);
     }
 
     /**
@@ -2748,7 +2744,6 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
             'entry_author' => $aContent['owner_id'],
             'subentry_sample' => $CNF['T']['txt_sample_vote_single'],
             'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
-            'modal_view' => $this->getName()
         ];
     }
 
@@ -2791,7 +2786,6 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
             'subentry_sample' => $CNF['T']['txt_sample_reaction_single'],
             'subentry_sample_params' => $aSubentrySampleParams,
             'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
-            'modal_view' => $this->getName()
         ];
     }
 
@@ -2866,7 +2860,6 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
             'entry_author' => $aContent['owner_id'],
             'subentry_sample' => $CNF['T']['txt_sample_score_' . $sType . '_single'],
             'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
-            'modal_view' => $this->getName()
         ];
     }
 

+ 0 - 3
template/scripts/BxBaseServiceMetatags.php

@@ -113,7 +113,6 @@ class BxBaseServiceMetatags extends BxDol
         if(!$oProfile)
             return [];
 
-        $sModalView = 'default';
         $sEntryUrl = $sEntryUrlApi = '';
         if (isset($aEvent['content']['module']) && isset($aEvent['content']['content_id'])) {
             if ('sys_cmts' == $aEvent['content']['module']) {
@@ -122,7 +121,6 @@ class BxBaseServiceMetatags extends BxDol
                 if ($oCmts && $aCmt) {
                     $sEntryUrl = $oCmts->getItemUrl($aCmt['cmt_id'], '{bx_url_root}');
                     $sEntryUrlApi = $oCmts->getItemUrlApi($aCmt['cmt_id'], '{bx_url_root}');
-                    $sModalView = $oCmts->geModalViewApi();
                 }
             }
             elseif (BxDolRequest::serviceExists($aEvent['content']['module'], 'get_link'))
@@ -139,7 +137,6 @@ class BxBaseServiceMetatags extends BxDol
             'entry_caption' => $oProfile->getDisplayName(),
             'entry_author' => $iProfile,
             'lang_key' => '_sys_metatags_mention_added',
-            'modal_view' => $sModalView
         ];
     }
 }