代码拉取完成,页面将自动刷新
同步操作将从 头上有灰机/DiscuzXPack 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
require_once "process_file_php.php";
require_once "process_file_js.php";
require_once "process_file.php";
require_once "md5files.php";
function prepare_package($encoding, $path, $target_path)
{
if (!in_array($encoding, array('SC_UTF8', 'TC_UTF8', 'SC_GBK', 'TC_BIG5'))) {
logging\error("unknown encoding %s", $encoding);
exit(1);
}
logging\info("---- preparing for %s ----", $encoding);
cpdir($path, $target_path);
// ipdata
$src = join_paths("dzfile/ipdata", $encoding, "tinyipdata.dat");
$target = join_paths($target_path, "upload/data/ipdata/tinyipdata.dat");
logging\info("copying tinyipdata.dat %s -> %s", $src, $target);
copy($src, $target);
if (starts_with($encoding, "TC_")) {
// 繁体图片
$src = "dzfile/image_big5";
$target = join_paths($target_path, "upload/static/image");
logging\info("copying traditional chinese images", $src, $target);
copy_all_files($src, $target);
convert_to_hant($target_path);
}
// 转换编码
if (ends_with($encoding, "_GBK")) {
convert_encoding_in($target_path, 'gbk');
}
if (ends_with($encoding, "_BIG5")) {
convert_encoding_in($target_path, 'big5');
}
if ($encoding != 'SC_UTF8') {
replace_encoding_variables($target_path, $encoding);
}
generate_discuzfiles_md5(join_paths($target_path, 'upload'));
}
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。