Browse Source

群友修复tag点击问题

tags/6.3.2
叙述、别离 10 months ago
parent
commit
4b619d3d31
4 changed files with 16 additions and 16 deletions
  1. +0
    -3
      src/admin/article_add.php
  2. +0
    -3
      src/admin/article_edit.php
  3. +7
    -7
      src/install/install.html
  4. +9
    -3
      src/system/archive/taglist.class.php

+ 0
- 3
src/admin/article_add.php View File

@@ -12,9 +12,6 @@ require_once(dirname(__FILE__).'/config.php');
CheckPurview('a_New,a_AccNew');
require_once(DEDEINC.'/customfields.func.php');
require_once(DEDEADMIN.'/inc/inc_archives_functions.php');
if (file_exists(DEDEDATA.'/template.rand.php')) {
require_once(DEDEDATA.'/template.rand.php');
}
if (empty($dopost)) $dopost = '';
if ($dopost != 'save') {
require_once(DEDEINC."/dedetag.class.php");


+ 0
- 3
src/admin/article_edit.php View File

@@ -12,9 +12,6 @@ require_once(dirname(__FILE__)."/config.php");
CheckPurview('a_Edit,a_AccEdit,a_MyEdit');
require_once(DEDEINC."/customfields.func.php");
require_once(DEDEADMIN."/inc/inc_archives_functions.php");
if (file_exists(DEDEDATA.'/template.rand.php')) {
require_once(DEDEDATA.'/template.rand.php');
}
if (empty($dopost)) $dopost = '';
$aid = isset($aid) && is_numeric($aid) ? $aid : 0;
if ($dopost != 'save') {


+ 7
- 7
src/install/install.html View File

@@ -69,10 +69,10 @@
<label for="dbname" class="form-label">数据库名称</label>
<div class="input-group">
<input type="text" name="dbname" id="dbname" class="form-control" placeholder="DedeBIZ">
<div class="input-group-append"><button type="button" id="btnCheckConnect" class="btn btn-success">检查</button></div>
<div class="input-group-append"><button type="button" id="dbtip" class="btn btn-success">检查</button></div>
</div>
</div>
<div id="alertConnect"></div>
<div id="dbinfo"></div>
<div class="form-group">
<label for="webname" class="form-label">网站名称</label>
<input type="text" name="webname" id="webname" class="form-control" placeholder="我的网站">
@@ -94,7 +94,7 @@
</div>
</div>
<script>
$("#btnCheckConnect").click(function() {
$("#dbtip").click(function() {
let dbhost = $('#dbhost').val();
let dbuser = $('#dbuser').val();
let dbpwd = $('#dbpwd').val();
@@ -104,17 +104,17 @@
console.log(rs);
let result = JSON.parse(rs);
if (result.code === 200) {
ShowAlert("#alertConnect", result.data, "success", 3000);
ShowAlert("#dbinfo", result.data, "success", 3000);
} else {
ShowAlert("#alertConnect", result.data, "danger", 3000);
ShowAlert("#dbinfo", result.data, "danger", 3000);
}
})
});
$("#dbtype").change(function() {
if ($(this).val() === 'sqlite') {
$(".form-group.server").hide()
$(".form-group.server").hide();
} else {
$(".form-group.server").show()
$(".form-group.server").show();
}
});
</script>


+ 9
- 3
src/system/archive/taglist.class.php View File

@@ -105,9 +105,15 @@ class TagList
}
if (isset($GLOBALS['PageNo'])) {
$this->PageNo = intval($GLOBALS['PageNo']);
if ($this->PageNo == 0) {
$this->PageNo = 1;
}
} else {
$this->PageNo = 1;
}
if (stripos(GetCurUrl(), 'makehtml_taglist_action.php')) {
$this->TotalResult = 1;
}
if ($this->TotalResult == -1) {
$cquery = "SELECT COUNT(*) AS dd FROM `#@__taglist` WHERE tid = '{$this->TagInfos['id']}' AND arcrank >-1 ";
$row = $this->dsql->GetOne($cquery);
@@ -115,16 +121,16 @@ class TagList
//更新Tag信息
$ntime = time();
//更新浏览量和记录数
$upquery = "UPDATE `#@__tagindex` SET total='{$row['dd']}',count=count+1,weekcc=weekcc+1,monthcc=monthcc+1 WHERE tag LIKE '{$this->Tag}' ";
$upquery = "UPDATE `#@__tagindex` SET total='{$row['dd']}',count=count+1,weekcc=weekcc+1,monthcc=monthcc+1 WHERE tag LIKE '{$this->TagInfos['tag']}' ";
$this->dsql->ExecuteNoneQuery($upquery);
$oneday = 24 * 3600;
//周统计
if (ceil(($ntime - $this->TagInfos['weekup']) / $oneday) > 7) {
$this->dsql->ExecuteNoneQuery("UPDATE `#@__tagindex` SET weekcc=0,weekup='{$ntime}' WHERE tag LIKE '{$this->Tag}' ");
$this->dsql->ExecuteNoneQuery("UPDATE `#@__tagindex` SET weekcc=0,weekup='{$ntime}' WHERE tag LIKE '{$this->TagInfos['tag']}' ");
}
//月统计
if (ceil(($ntime - $this->TagInfos['monthup']) / $oneday) > 30) {
$this->dsql->ExecuteNoneQuery("UPDATE `#@__tagindex` SET monthcc=0,monthup='{$ntime}' WHERE tag LIKE '{$this->Tag}' ");
$this->dsql->ExecuteNoneQuery("UPDATE `#@__tagindex` SET monthcc=0,monthup='{$ntime}' WHERE tag LIKE '{$this->TagInfos['tag']}' ");
}
}
$ctag = $this->dtp->GetTag("page");


Loading…
Cancel
Save