* Story list response time reduced by 67%.

This commit is contained in:
songchenxuan
2023-06-26 13:19:46 +08:00
parent 4c1eadba72
commit a5152dff48
+3 -1
View File
@@ -4497,10 +4497,12 @@ class storyModel extends model
global $app, $config;
static $shadowProducts = array();
if(empty($shadowProducts[$story->product]))
static $hasShadow = true;
if($hasShadow and empty($shadowProducts[$story->product]))
{
global $dbh;
$stmt = $dbh->query('SELECT id FROM ' . TABLE_PRODUCT . " WHERE shadow = 1")->fetchAll();
if(empty($stmt)) $hasShadow = false;
foreach($stmt as $row) $shadowProducts[$row->id] = $row->id;
}