Преглед изворни кода

#4761 Oembed.php shouldn't process links if Oembed provider is disabled

Alex Trofimov пре 2 година
родитељ
комит
74b9bccb06
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      oembed.php

+ 4 - 1
oembed.php

@@ -10,6 +10,9 @@
 require_once('./inc/header.inc.php');
 require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
 
+if (getParam('sys_embed_default') != 'sys_oembed')
+    exit;
+
 $aLinks = bx_get('l');
 
 bx_import('BxDolEmbed');
@@ -18,4 +21,4 @@ if(($oEmbed = BxDolEmbed::getObjectInstance('sys_system')) !== false) {
         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
         echoJson($oEmbed->parseLinks($aLinks));
-}
+}