From: edward Date: Tue, 17 Apr 2018 07:35:26 +0000 (+0800) Subject: DataObjects/Cms_page.php X-Git-Url: http://git.roojs.org/?p=Pman.Cms;a=commitdiff_plain;h=eaf44d9587a7b6d288b72364bd75d7fd4590a706 DataObjects/Cms_page.php --- diff --git a/DataObjects/Cms_page.php b/DataObjects/Cms_page.php index 0b464f0d..87abfc6f 100644 --- a/DataObjects/Cms_page.php +++ b/DataObjects/Cms_page.php @@ -1937,36 +1937,36 @@ class Pman_Cms_DataObjects_Cms_page extends DB_DataObject $bgimage = $image->fetchAll(false, false, 'toArray'); - $video = false; - $player = (empty($country) || $country != 'CN') ? 'youtu.be' : 'youku.com'; - - foreach ($bgimage as $k => $v) { - - if(empty($v['linkurl'])){ - continue; - } - - if(!preg_match('/(youtu.be|youku.com)/i', $v['linkurl'])){ - continue; - } - - if(strpos($v['linkurl'], $player) === false){ - - if(empty($video)){ - $video = $v; - } - - unset($bgimage[$k]); - continue; - } - - $video = $v; - unset($bgimage[$k]); - } - - if(!empty($video)){ - array_unshift($bgimage, $video); - } +// $video = false; +// $player = (empty($country) || $country != 'CN') ? 'youtu.be' : 'youku.com'; +// +// foreach ($bgimage as $k => $v) { +// +// if(empty($v['linkurl'])){ +// continue; +// } +// +// if(!preg_match('/(youtu.be|youku.com)/i', $v['linkurl'])){ +// continue; +// } +// +// if(strpos($v['linkurl'], $player) === false){ +// +// if(empty($video)){ +// $video = $v; +// } +// +// unset($bgimage[$k]); +// continue; +// } +// +// $video = $v; +// unset($bgimage[$k]); +// } +// +// if(!empty($video)){ +// array_unshift($bgimage, $video); +// } $ret[$c->element_id_name][] = array( 'size' => (empty($c->template_id_template)) ? '' : $c->template_id_template,