DataObjects/Cms_page.php
authoredward <edward@roojs.com>
Tue, 17 Apr 2018 07:31:54 +0000 (15:31 +0800)
committeredward <edward@roojs.com>
Tue, 17 Apr 2018 07:31:54 +0000 (15:31 +0800)
DataObjects/Cms_page.php

index ce4ff49..90e2f71 100644 (file)
@@ -1964,27 +1964,8 @@ class Pman_Cms_DataObjects_Cms_page extends DB_DataObject
                 unset($bgimage[$k]);
             }
             
-            if(!empty($country) && count($bgimage) > 1){
-                
-                $bg = $bgimage;
-                $bgimage = array();
-                
-                $player = (empty($country) || $country != 'CN') ? 'youtu.be' : 'youku.com';
-                
-                foreach ($bg as $i){
-                    
-                    if(empty($i['linkurl']) || strpos($i['linkurl'], $player) === false){
-                        continue;
-                    }
-                    
-                    $bgimage[] = $i;
-                    break;
-                    
-                }
-                
-                if(empty($bgimage)){
-                    $bgimage[] = $bg[0];
-                }
+            if(!empty($video)){
+                array_unshift($bgimage, $video);
             }
             
             $ret[$c->element_id_name][] = array(