Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
CalculateNumberOfPages() way too complicated
sirlancelot
New
library/Framework/Framework.Functions.php @ line 118I know it's only executed once per request, but inefficiency is my pet peeve. Even if it's just replacing 13 lines with 2.function CalculateNumberOfPages($ItemCount, $ItemsPerPage) {
$PageCount = ceil($ItemCount/$ItemsPerPage);
return ForceInt($PageCount, 1);
}
0
Comments