mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 14:56:13 -06:00
#533 fix alibaba installation error + show latest stores in home page
This commit is contained in:
parent
746cfd86ae
commit
bdc86d8b6d
@ -52,6 +52,22 @@ class AdvCriteria extends EntryCriteria
|
|||||||
return $ads;
|
return $ads;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function allAdvs()
|
||||||
|
{
|
||||||
|
$advModel = new AdvModel();
|
||||||
|
$latest_advs = AdvModel::query()
|
||||||
|
->whereDate('finish_at', '>=', date("Y-m-d H:i:s"))
|
||||||
|
->where('status', '=', 'approved')
|
||||||
|
->where('slug', '!=', '')
|
||||||
|
->paginate($this->settings->value('visiosoft.theme.base::s-type-latest-limit'));
|
||||||
|
|
||||||
|
$ads = $advModel->getLocationNames($latest_advs);
|
||||||
|
foreach ($ads as $index => $ad) {
|
||||||
|
$ads[$index]->detail_url = $advModel->getAdvDetailLinkByModel($ad, 'list');
|
||||||
|
$ads[$index] = $advModel->AddAdsDefaultCoverImage($ad);
|
||||||
|
}
|
||||||
|
return $ads;
|
||||||
|
}
|
||||||
|
|
||||||
public function getCurrentLocale()
|
public function getCurrentLocale()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user