织梦发布未审核文章时间与当前时间同步解决办法

微商推广平台

织梦dededcms发布未审核文章时自动将时间改为最新时间?怎么弄呢?很简单,其实就是在update语句里面把时间也加进去,改成最新时间就OK。(替换前请先注意做好文件备份,以免你懂的)
dedecms版本5.7sp2 大家可以参考参考
在dede目录下 找到archives_do.php文件
大概在252行,将

$maintable = ( trim($row['maintable'])=='' ? '#@__archives' : trim($row['maintable']) );
$dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank='0' WHERE id='$aid' ");
if($row['issystem']==-1)
{
$dsql->ExecuteNoneQuery("UPDATE `".trim($row['addtable'])."` SET arcrank='0' WHERE aid='$aid' ");
}
else
{
$dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='0', dutyadmin='".$cuserLogin->getUserID()."' WHERE id='$aid' ");
}
$dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET arcrank='0' WHERE aid='$aid' ");
$pageurl = MakeArt($aid,false); ------------------------ 替换为:------------------------  $maintable = ( trim($row['maintable'])=='' ? '#@__archives' : trim($row['maintable']) );
$newdate = time();
$dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET sortrank='$newdate',senddate='$newdate',arcrank='0' WHERE id='$aid' ");
if($row['issystem']==-1)
{
$dsql->ExecuteNoneQuery("UPDATE `".trim($row['addtable'])."` SET pubdate='$newdate',sortrank='$newdate',senddate='$newdate',arcrank='0' WHERE aid='$aid' ");
}
else
{
$dsql->ExecuteNoneQuery("UPDATE `$maintable` SET pubdate='$newdate',sortrank='$newdate',senddate='$newdate',arcrank='0', dutyadmin='".$cuserLogin->getUserID()."' WHERE id='$aid' ");
}
$dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET arcrank='0' WHERE aid='$aid' ");
$pageurl = MakeArt($aid,false);
小Y电商
微商怎么找客源

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: