|
|
@@ -675,13 +675,12 @@ class ListView |
|
|
|
}
|
|
|
|
//如果不用默认的sortrank或id排序,使用联合查询(数据量大时非常缓慢)
|
|
|
|
if (preg_match('/hot|click|lastpost/', $orderby)) {
|
|
|
|
$query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,
|
|
|
|
tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
|
|
|
|
$addField
|
|
|
|
FROM `#@__archives` arc
|
|
|
|
LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
|
|
|
|
$addJoin
|
|
|
|
WHERE {$this->addSql} $filtersql $ordersql LIMIT $limitstart,$row";
|
|
|
|
$query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
|
|
|
|
$addField
|
|
|
|
FROM `#@__archives` arc
|
|
|
|
LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
|
|
|
|
$addJoin
|
|
|
|
WHERE {$this->addSql} $filtersql $ordersql LIMIT $limitstart,$row";
|
|
|
|
}
|
|
|
|
//普通情况先从arctiny表查出ID,然后按ID查询(速度非常快)
|
|
|
|
else {
|
|
|
@@ -697,12 +696,11 @@ class ListView |
|
|
|
if ($idstr == '') {
|
|
|
|
return '';
|
|
|
|
} else {
|
|
|
|
$query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,
|
|
|
|
tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
|
|
|
|
$addField
|
|
|
|
FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
|
|
|
|
$addJoin
|
|
|
|
WHERE arc.id in($idstr) $ordersql ";
|
|
|
|
$query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
|
|
|
|
$addField
|
|
|
|
FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
|
|
|
|
$addJoin
|
|
|
|
WHERE arc.id in($idstr) $ordersql ";
|
|
|
|
}
|
|
|
|
$t2 = ExecTime();
|
|
|
|
//echo $t2-$t1;
|
|
|
@@ -886,7 +884,9 @@ class ListView |
|
|
|
}
|
|
|
|
for ($j; $j <= $total_list; $j++) {
|
|
|
|
if ($j == $this->PageNo) {
|
|
|
|
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>\r\n";
|
|
|
|
//$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>\r\n";
|
|
|
|
$listdd .= "<li class='page-item'><a class='page-link' href='".$typedir."'>'.$j.'</a></li>\r\n";
|
|
|
|
|
|
|
|
} else {
|
|
|
|
$listdd .= "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $j, $tnamerule)."'>".$j."</a></li>\r\n";
|
|
|
|
}
|
|
|
|