Change size checks (like bigger than 3 MB) to use TextSinglePageByteCount, not number and units

This commit is contained in:
Mike Colagrosso 2024-04-20 23:22:56 -06:00 committed by Alex Cabal
parent ccd73c7cb4
commit 41b130195f

View file

@ -288,8 +288,8 @@ catch(Exceptions\EbookNotFoundException){
<li property="schema:encoding" typeof="schema:mediaObject"> <li property="schema:encoding" typeof="schema:mediaObject">
<meta property="schema:description" content="XHTML"/> <meta property="schema:description" content="XHTML"/>
<meta property="schema:encodingFormat" content="application/xhtml+xml"/> <meta property="schema:encodingFormat" content="application/xhtml+xml"/>
<p<? if($ebook->TextSinglePageSizeNumber >= 3 && $ebook->TextSinglePageSizeUnit == 'M'){ ?> class="has-size"<? } ?>> <p<? if($ebook->TextSinglePageByteCount >= EBOOK_SINGLE_PAGE_SIZE_WARNING){ ?> class="has-size"<? } ?>>
<a property="schema:contentUrl" href="<?= $ebook->TextSinglePageUrl ?>" class="page">Read on one page</a><? if($ebook->TextSinglePageSizeNumber >= 3 && $ebook->TextSinglePageSizeUnit == 'M'){ ?><span><?= $ebook->TextSinglePageSizeNumber ?>MB</span><? } ?> <a property="schema:contentUrl" href="<?= $ebook->TextSinglePageUrl ?>" class="page">Read on one page</a><? if($ebook->TextSinglePageByteCount >= EBOOK_SINGLE_PAGE_SIZE_WARNING){ ?><span><?= $ebook->TextSinglePageSizeNumber ?>MB</span><? } ?>
</p> </p>
</li> </li>
<? } ?> <? } ?>