瀏覽代碼

Update inc_archives_functions.php

修正自动功能
undefined
叙述、别离 6 天之前
父節點
當前提交
4ac4da6342
共有 1 個文件被更改,包括 7 次插入7 次删除
  1. +7
    -7
      src/admin/inc/inc_archives_functions.php

+ 7
- 7
src/admin/inc/inc_archives_functions.php 查看文件

@@ -509,15 +509,15 @@ function PrintAutoFieldsEdit(&$fieldset, &$fieldValues, $loadtype = 'all')
function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '')
{
global $autolitpic, $remote, $dellink, $autokey, $cfg_basehost, $cfg_auot_description, $id, $title, $cfg_bizcore_appid, $cfg_bizcore_key;
$autolitpic = (empty($autolitpic) ? '' : $autolitpic);
$autokey = (empty($autokey) && $autokey == 1 ? '' : $autokey);
$autolitpic = empty($autolitpic) ? '' : $autolitpic;
$autokey = empty($autokey) ? '' : $autokey;
$body = stripslashes($body);
//远程图片本地化
if ($remote == 1) {
if ($remote === '1') {
$body = GetCurContent($body);
}
//删除非站内链接
if ($dellink == 1) {
if ($dellink === '1') {
$allow_urls = array($_SERVER['HTTP_HOST']);
//读取允许的超链接设置
if (file_exists(DEDEDATA."/admin/allowurl.txt")) {
@@ -526,17 +526,17 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = ''
$body = Replace_Links($body, $allow_urls);
}
//自动摘要
if ($cfg_auot_description > 0 && $description == '') {
if ($cfg_auot_description > 0 && $description === '') {
$description = cn_substr(html2text($body), $cfg_auot_description);
$description = trim(preg_replace('/#p#|#e#/', '', $description));
$description = addslashes($description);
}
//自动获取缩略图
if ($autolitpic == 1 && $litpic == '') {
if ($autolitpic === '1' && $litpic === '') {
$litpic = GetDDImgFromBody($body);
}
//自动获取关键词
if ($autokey == 1) {
if ($autokey === '1') {
$subject = $title." ".Html2Text($body);
//采用DedeBIZ Core分词组件分词
if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) {


Loading…
取消
儲存