Explorar el Código

Ticket #4863 - System: Oembed provider generates the error during the link's inserting.

AntonLV hace 1 año
padre
commit
077dbbff56
Se han modificado 2 ficheros con 1 adiciones y 23 borrados
  1. 1 1
      oembed.php
  2. 0 22
      template/scripts/BxBaseEmbedSystem.php

+ 1 - 1
oembed.php

@@ -16,7 +16,7 @@ if (getParam('sys_embed_default') != 'sys_oembed')
 $aLinks = bx_get('l');
 
 bx_import('BxDolEmbed');
-if(($oEmbed = BxDolEmbed::getObjectInstance('sys_system')) !== false) {
+if(($oEmbed = BxDolEmbed::getObjectInstance('sys_oembed')) !== false) {
     if(bx_get('html'))
         echo '<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"" /><style>body, html {margin:0px} A{text-decoration:none; color:#222}</style><div style=" margin:0px auto; justify-content: center;" id="ifr">' . $oEmbed->getLinkHTML($aLinks) . '</div>';
     else

+ 0 - 22
template/scripts/BxBaseEmbedSystem.php

@@ -69,9 +69,6 @@ class BxBaseEmbedSystem extends BxDolEmbed
             'icon2' => ['tag' => 'link', 'name_attr' => 'rel', 'name' => 'icon', 'content_attr' => 'href'],
             'icon3' => ['tag' => 'link', 'name_attr' => 'rel', 'name' => 'apple-touch-icon', 'content_attr' => 'href'],
         ]);
-
-
-        
         
         $a = array_merge($a, [
            'image' => $a['OGImage'] ? $a['OGImage'] : $a['thumbnailUrl'],
@@ -81,8 +78,6 @@ class BxBaseEmbedSystem extends BxDolEmbed
 
         unset($a['OGImage'], $a['thumbnailUrl'], $a['icon'], $a['icon2'], $a['icon3']);
 
-        
-
         if($a['image'] == '') {
             $c = [];
             if (getParam('sys_embed_microlink_key') != ''){
@@ -117,23 +112,6 @@ class BxBaseEmbedSystem extends BxDolEmbed
 
         return json_encode($a);
     }
-
-    public function parseLinks(&$aLinks)
-    {
-        $aResult = [];
-
-        if($aLinks && is_array($aLinks)) {
-            $oEmbera = $this->getEmberaInstance();
-
-            foreach ($aLinks as $sLink) {
-                $sHtml = $oEmbera->autoEmbed($sLink);
-                //if nothing to change/embed then return empty string to not replace anything on a frontend
-                $aResult[] = ['html' => $sHtml != $sLink ? $sHtml : ''];
-            }
-        }
-
-        return $aResult;
-    }
 }
 
 /** @} */