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

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

AntonLV 1 год назад
Родитель
Сommit
1dc50c7fb2
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      modules/boonex/videos/classes/BxVideosFormEntry.php

+ 7 - 1
modules/boonex/videos/classes/BxVideosFormEntry.php

@@ -237,7 +237,13 @@ class BxVideosFormEntry extends BxBaseModTextFormEntry
 		);
     }
 
-    public function genCustomRowVideoEmbed(&$aInput) {
+    public function genCustomRowVideoEmbed(&$aInput) 
+    {
+        if (bx_is_api()){
+            $aInput['type'] = 'embed';
+            return $aInput;
+        }
+        
         $sSource = isset($this->aInputs['video_source']) && $this->aInputs['video_source']['value'] == 'embed' ? 'embed' : 'upload';
         if ($sSource != 'embed') {
             if (!is_array($aInput['tr_attrs']))