function testGetMaxUploadSize() { $result = CoreUtils::getMaxUploadSize(['4M', '10M']); self::assertEquals('4 MB', $result); $result = CoreUtils::getMaxUploadSize(['4k', '4k']); self::assertEquals('4 KB', $result); $result = CoreUtils::getMaxUploadSize(['5G', '5M']); self::assertEquals('5 MB', $result); }
echo !empty($_GET['q']) ? " value='" . CoreUtils::aposEncode($_GET['q']) . "'" : ''; ?> title='Search'> <button type='submit' class='blue'>Search</button> <button type='button' class='green typcn typcn-flash sanic-button' title="I'm feeling lucky"></button> <button type='reset' class='red typcn typcn-times' title='Clear'<?php echo empty($_GET['q']) ? ' disabled' : ''; ?> ></button> </form> <? } else echo CoreUtils::notice('warn','<span class="typcn typcn-warning"></span> <strong>ElasticSearch server is down!</strong> Please <a class="send-feedback">let us know</a>, and in the meantime, use the <a class="btn darkblue typcn typcn-th-menu" href="/cg'.($EQG?'/eqg':'').'/full">Full List</a> to find appearances faster. Sorry for the inconvenience.',true); ?> <?php echo $Pagination->HTML . Appearances::getHTML($Ponies) . $Pagination->HTML; ?> </div> <? $export = array( 'Color' => $Color, 'color' => $color, 'EQG' => $EQG, 'AppearancePage' => false, ); if (Permission::sufficient('staff')) $export = array_merge($export, array( 'TAG_TYPES_ASSOC' => Tags::$TAG_TYPES_ASSOC, 'MAX_SIZE' => CoreUtils::getMaxUploadSize(), 'HEX_COLOR_PATTERN' => $HEX_COLOR_REGEX, )); echo CoreUtils::exportVars($export); ?>