link->getPageLink('module-hifaq-faqdetails', null, $id_lang, ['faq_link_rewrite' => $faq['friendly_url']]); } else { $urls[] = $context->link->getModuleLink('hifaq', 'faqdetails', [], null, $id_lang) . '&faq_link_rewrite=' . $faq['friendly_url']; } } return $urls; } /** * An estimated number of URLs that will be returned by self::getJprestaAllURLs() for the current shop context. * Since we don't have the id_lang parameter we recommend to return the number of URLs for the language that have * the most URLs. * @return int The estimated number of URLs to warmup for the current shop context */ public static function getJprestaAllURLsCount() { $sql = 'SELECT COUNT(*) FROM `' . _DB_PREFIX_ . 'hifaq` f LEFT JOIN `' . _DB_PREFIX_ . 'hifaq_lang` fl ON f.id_faq=fl.id_faq LEFT JOIN `' . _DB_PREFIX_ . 'hifaq_shop` fs ON f.id_faq=fs.id_faq WHERE f.active=1 AND fl.id_lang=' . (int)Configuration::get('PS_LANG_DEFAULT') . ' AND fs.id_shop=' . (int)Shop::getContextShopID(); return (int) JPresta\SpeedPack\JprestaUtils::dbGetValue($sql); } }