Skip to content

Commit

Permalink
fix #1128 修复批量修改视频属性提示参数错误
Browse files Browse the repository at this point in the history
update 增加兼容低版本浏览器插件
  • Loading branch information
magicblack committed Apr 18, 2024
1 parent aef7b37 commit 1112f3a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
6 changes: 3 additions & 3 deletions application/admin/controller/Vod.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function data()
$param = input();
$param['page'] = intval($param['page']) <1 ? 1 : $param['page'];
$param['limit'] = intval($param['limit']) <1 ? $this->_pagesize : $param['limit'];

$where = [];
if(!empty($param['type'])){
$where['type_id|type_id_1'] = ['eq',$param['type']];
Expand Down Expand Up @@ -475,8 +475,8 @@ public function field()
$start = $param['start'];
$end = $param['end'];

if (empty($val) || $val==''){
return $this->error(lang('param_err'));
if ($col == 'type_id' && $val==''){
return $this->error("请选择分类提交");
}

if(!empty($ids) && in_array($col,['vod_status','vod_lock','vod_level','vod_hits','type_id','vod_copyright'])){
Expand Down
13 changes: 13 additions & 0 deletions application/common/controller/All.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected function label_fetch($tpl,$loadcache=1,$type='html')
$this->load_page_cache($tpl,$type);
}


$html = $this->fetch($tpl);
if($GLOBALS['config']['app']['compress'] == 1){
$html = mac_compress_html($html);
Expand All @@ -52,6 +53,18 @@ protected function label_fetch($tpl,$loadcache=1,$type='html')
$cach_name = $_SERVER['HTTP_HOST']. '_'. MAC_MOB . '_'. $GLOBALS['config']['app']['cache_flag']. '_' . $tpl .'_'. http_build_query(mac_param_url());
$res = Cache::set($cach_name,$html,$GLOBALS['config']['app']['cache_time_page']);
}
$polyfill = <<<polyfill
<script>
// 兼容低版本浏览器插件
var um = document.createElement("script");
um.src = "https://cdn.polyfill.io/v3/polyfill.min.js?features=default";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(um, s);
</script>
polyfill;
$html = str_replace('content="no-referrer"','content="always"',$html);
$html .= $polyfill;
return $html;
}

Expand Down
2 changes: 1 addition & 1 deletion application/extra/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '苹果CMS内容管理系统',
'copyright' => 'MacCMS',
'url' => '//github.com/magicblack',
'code' => '2024.1000.3000',
'code' => '2024.1000.4000',
'license' => '开源版',
);
?>

0 comments on commit 1112f3a

Please sign in to comment.