Skip to content

Commit 0137b92

Browse files
committed
1、去除更新全站缓存中的 更新视频缓存
2、去除一键清理数据中的 视频库 选项
1 parent ee07d25 commit 0137b92

File tree

6 files changed

+2
-39
lines changed

6 files changed

+2
-39
lines changed

phpcms/languages/zh-cn/admin.lang.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,6 @@
648648
$LANG['site_cache_success'] = '缓存完成..........</li><li style=\"color: red;\">全站缓存更新成功';
649649
$LANG['please_choose_the_default_style'] = '请选择默认风格';
650650
$LANG['cache_copyfrom'] = '来源';
651-
$LANG['video_category_tb'] = '同步视频模型栏目';
652651

653652
$LANG['please_select_a_style_and_select_the_template'] = '请选择风格后,选择默认模板。';
654653
$LANG['default_style'] = '默认风格';

phpcms/languages/zh-cn/content.lang.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@
320320
$LANG['clear_data_message'] = '一、初始化数据已经清理完毕,请执行“更新栏目缓存”及“更新缓存”操作!<br />二、初始化数据已经备份到caches/bakup/default/下面';
321321
$LANG['please_choose_talbes'] = '请选择需要清理的数据';
322322
$LANG['models'] = '模型';
323-
$LANG['video_library'] = '视频库';
324323
$LANG['can_not_recovered'] = '清理后,不可恢复';
325324
$LANG['clear'] = '清理';
326325
?>

phpcms/modules/admin/cache_all.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public function init() {
3939
array('name' => L('cache_file'), 'function' => 'cache2database'),
4040
array('name' => L('cache_copyfrom'), 'function' => 'copyfrom'),
4141
array('name' => L('clear_files'), 'function' => 'del_file'),
42-
array('name' => L('video_category_tb'), 'function' => 'video_category_tb'),
4342
);
4443
$this->cache_api = pc_base::load_app_class('cache_api', 'admin');
4544
$m = $modules[$page];

phpcms/modules/admin/classes/cache_api.class.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -572,16 +572,4 @@ public function copyfrom() {
572572
setcache('copyfrom', $infos, 'admin');
573573
return true;
574574
}
575-
/**
576-
* 同步视频模型栏目
577-
*/
578-
public function video_category_tb() {
579-
if (module_exists('video')) {
580-
$setting = getcache('video', 'video');
581-
pc_base::load_app_class('ku6api', 'video', 0);
582-
$ku6api = new ku6api($setting['sn'], $setting['skey']);
583-
$ku6api->get_categorys();
584-
}
585-
return true;
586-
}
587575
}

phpcms/modules/content/content.php

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,7 @@ public function delete() {
281281
$this->content_check_db = pc_base::load_model('content_check_model');
282282
$this->position_data_db = pc_base::load_model('position_data_model');
283283
$this->search_db = pc_base::load_model('search_model');
284-
//判断视频模块是否安装
285-
if (module_exists('video') && file_exists(PC_PATH.'model'.DIRECTORY_SEPARATOR.'video_content_model.class.php')) {
286-
$video_content_db = pc_base::load_model('video_content_model');
287-
$video_install = 1;
288-
}
284+
289285
$this->comment = pc_base::load_app_class('comment', 'comment');
290286
$search_model = getcache('search_model_'.$this->siteid,'search');
291287
$typeid = $search_model[$modelid]['typeid'];
@@ -329,10 +325,6 @@ public function delete() {
329325
$this->position_data_db->delete(array('id'=>$id,'catid'=>$catid,'module'=>'content'));
330326
//删除全站搜索中数据
331327
$this->search_db->delete_search($typeid,$id);
332-
//删除视频库与内容对应关系数据
333-
if ($video_install ==1) {
334-
$video_content_db->delete(array('contentid'=>$id, 'modelid'=>$modelid));
335-
}
336328

337329
//删除相关的评论,删除前应该判断是否还存在此模块
338330
if(module_exists('comment')){
@@ -1013,7 +1005,7 @@ public function clear_data() {
10131005

10141006
if ($_POST['dosubmit']) {
10151007
set_time_limit(0);
1016-
$models = array('category', 'content', 'hits', 'search', 'position_data', 'video_content', 'video_store', 'comment');
1008+
$models = array('category', 'content', 'hits', 'search', 'position_data', 'comment');
10171009
$tables = $_POST['tables'];
10181010
if (is_array($tables)) {
10191011
foreach ($tables as $t) {
@@ -1063,16 +1055,6 @@ public function clear_data() {
10631055
$this->create_sql_file($result, $position_db->db_tablepre.'position_data', $sql_file);
10641056
}
10651057
$position_db->delete('`modelid`='.$modelid.' AND `module`=\'content\'');
1066-
//清理视频库与内容对应关系表
1067-
if (module_exists('video')) {
1068-
$video_content_db = pc_base::load_model('video_content_model');
1069-
$result = $video_content_db->select('`modelid`=\''.$modelid.'\'');
1070-
if (is_array($result)) {
1071-
$sql_file = CACHE_PATH.'bakup'.DIRECTORY_SEPARATOR.'default'.DIRECTORY_SEPARATOR.'video_content-'.$modelid.'.sql';
1072-
$this->create_sql_file($result, $video_content_db->db_tablepre.'video_content', $sql_file);
1073-
}
1074-
$video_content_db->delete('`modelid`=\''.$modelid.'\'');
1075-
}
10761058
//清理评论表及附件表,附件的清理为不可逆操作。
10771059
//附件初始化
10781060
//$attachment = pc_base::load_model('attachment_model');

phpcms/modules/content/templates/clear_data.tpl.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
<td align="center"></td>
2626
<td><?php foreach($model_arr as $m) {?><label><input type="checkbox" name="model[]" value="<?php echo $m['modelid'];?>" > <?php echo $m['name']?></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php }?></td>
2727
</tr>
28-
<tr>
29-
<td align="center" width="100"><input name="tables[]" type="checkbox" value="video_store" class="input-text-c input-text"></td>
30-
<td><?php echo L('video_library')?></td>
31-
</tr>
3228
<tr>
3329
<td align="center" width="100"><input name="tables[]" type="checkbox" value="comment" class="input-text-c input-text"></td>
3430
<td><?php echo L('comment')?>(<span style="color:#d55"><?php echo L('can_not_recovered')?></span>)</td>

0 commit comments

Comments
 (0)